From 091d5221948ca4a6decd091bc3a5e0063adf1443 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Mon, 9 Jan 2023 21:58:20 -0400 Subject: hopefully fix normal pages on windows --- src/util/urls.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src/util') 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, -- cgit 1.3.0-6-gf8a5