Ensure in-app navigation via navigate to action automatically prefixes URLs with slashes
This commit is contained in:
parent
c726dfbedb
commit
c89a7a261f
|
@ -238,7 +238,13 @@ const triggerAutomationHandler = async action => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const navigationHandler = action => {
|
const navigationHandler = action => {
|
||||||
const { url, peek, externalNewTab } = action.parameters
|
let { url, peek, externalNewTab, type } = action.parameters
|
||||||
|
|
||||||
|
// Ensure in-app navigation starts with a slash
|
||||||
|
if (type === "screen" && url && !url.startsWith("/")) {
|
||||||
|
url = `/${url}`
|
||||||
|
}
|
||||||
|
|
||||||
routeStore.actions.navigate(url, peek, externalNewTab)
|
routeStore.actions.navigate(url, peek, externalNewTab)
|
||||||
closeSidePanelHandler()
|
closeSidePanelHandler()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue