Don't place fragment links if deep linking is disabled

This commit is contained in:
Kyle Shockey
2017-07-14 01:50:49 -07:00
parent 73845907a3
commit 556e40e6d4
2 changed files with 17 additions and 4 deletions

View File

@@ -116,7 +116,8 @@ export default class Operation extends PureComponent {
specActions,
specSelectors,
authActions,
authSelectors
authSelectors,
getConfigs
} = this.props
let summary = operation.get("summary")
@@ -141,6 +142,10 @@ export default class Operation extends PureComponent {
const Markdown = getComponent( "Markdown" )
const Schemes = getComponent( "schemes" )
const { deepLinking } = getConfigs()
const isDeepLinkingEnabled = deepLinking && deepLinking !== "false"
// Merge in Live Response
if(response && response.size > 0) {
let notDocumented = !responses.get(String(response.get("status")))
@@ -159,7 +164,7 @@ export default class Operation extends PureComponent {
<a
className="nostyle"
onClick={(e) => e.preventDefault()}
href={`#/${isShownKey[1]}/${isShownKey[2]}`} >
href={ isDeepLinkingEnabled ? `#/${isShownKey[1]}/${isShownKey[2]}` : ""} >
<span>{path}</span>
</a>
<JumpToPath path={jumpToKey} />