diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2025-01-17 07:57:26 -0400 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2025-01-17 08:37:45 -0400 |
commit | 90d466482e73e7a00023151e1c894f66d1c2ad79 (patch) | |
tree | 6890707fc85d83be3d5604a9456e9b8c64788fb2 /src/urls.js | |
parent | fcf4d18fc1973b2d4edc0cd76e9450cfccb6404c (diff) |
urls, upd8: default-override & optional url specs
Diffstat (limited to 'src/urls.js')
-rw-r--r-- | src/urls.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/urls.js b/src/urls.js index 1a471b30..71173f7f 100644 --- a/src/urls.js +++ b/src/urls.js @@ -11,6 +11,13 @@ import {withEntries} from '#sugar'; export * from './url-spec.js'; export function generateURLs(urlSpec) { + if ( + typeof urlSpec.localized === 'object' && + typeof urlSpec.localizedWithBaseDirectory !== 'object' + ) { + throw new Error(`Provided urlSpec missing localizedWithBaseDirectory`); + } + const getValueForFullKey = (obj, fullKey) => { const [groupKey, subKey] = fullKey.split('.'); if (!groupKey || !subKey) { |