Skip to content

fix deep link by proper tag extraction when slash is in tag #10313

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/core/plugins/deep-linking/layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,13 @@ export default {
return state.get("scrollToKey")
},
isShownKeyFromUrlHashArray(state, urlHashArray) {
const [tag, operationId] = urlHashArray
let normalizedUrlSegments = urlHashArray.slice()
// If there are more than 2 segments, treat all segments except the last one as the tag
if (normalizedUrlSegments.length > 2) {
normalizedUrlSegments = [normalizedUrlSegments.slice(0, 1).join("/"), normalizedUrlSegments.at(-1)]
}

const [tag, operationId] = normalizedUrlSegments
// We only put operations in the URL
if(operationId) {
return ["operations", tag, operationId]
Expand Down