mirror of
https://github.com/zadam/trilium.git
synced 2025-11-02 04:29:01 +01:00
fix(link): Allow external links containing # to navigate
This commit is contained in:
parent
4ed30e0624
commit
a5ba1b0489
@ -204,11 +204,17 @@ export function parseNavigationStateFromUrl(url: string | undefined) {
|
||||
return {};
|
||||
}
|
||||
|
||||
url = url.trim();
|
||||
const hashIdx = url.indexOf("#");
|
||||
if (hashIdx === -1) {
|
||||
return {};
|
||||
}
|
||||
|
||||
// Exclude external links that contain #
|
||||
if (hashIdx !== 0 && !url.includes("/#root")) {
|
||||
return {};
|
||||
}
|
||||
|
||||
const hash = url.substr(hashIdx + 1); // strip also the initial '#'
|
||||
let [notePath, paramString] = hash.split("?");
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user