diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2023-01-09 21:58:20 -0400 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2023-01-09 21:58:20 -0400 |
commit | 091d5221948ca4a6decd091bc3a5e0063adf1443 (patch) | |
tree | ae0143e16992a8ec5702a894b9c05e5321c793b5 /src/util | |
parent | 0480e9a6502695fb741fc300db03ef734f38b51c (diff) |
hopefully fix normal pages on windows
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/urls.js | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/util/urls.js b/src/util/urls.js index 69ff1d7e..78bcd200 100644 --- a/src/util/urls.js +++ b/src/util/urls.js @@ -186,22 +186,25 @@ export function getURLsFrom({ export function getPagePathname({ baseDirectory, + device = false, fullKey, urlArgs, urls, }) { const [groupKey, subKey] = fullKey.split('.'); + const toKey = device ? 'toDevice' : 'to'; + return (groupKey === 'localized' && baseDirectory ? urls - .from('shared.root') - .toDevice( + .from('shared.root')[toKey]( 'localizedWithBaseDirectory.' + subKey, baseDirectory, ...urlArgs) : urls - .from('shared.root') - .toDevice(fullKey, ...urlArgs)); + .from('shared.root')[toKey]( + fullKey, + ...urlArgs)); } // Needed for the rare path arguments which themselves contains one or more @@ -221,6 +224,7 @@ export function getPagePaths({ const pathname = getPagePathname({ baseDirectory, + device: true, fullKey, urlArgs, urls, |