From 90d466482e73e7a00023151e1c894f66d1c2ad79 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Fri, 17 Jan 2025 07:57:26 -0400 Subject: urls, upd8: default-override & optional url specs --- src/urls.js | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/urls.js') 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) { -- cgit 1.3.0-6-gf8a5