diff options
Diffstat (limited to 'src/util/urls.js')
-rw-r--r-- | src/util/urls.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/util/urls.js b/src/util/urls.js index ce747df2..45ec4c85 100644 --- a/src/util/urls.js +++ b/src/util/urls.js @@ -14,19 +14,19 @@ import * as path from 'path'; import {withEntries} from './sugar.js'; export function generateURLs(urlSpec) { - const getValueForFullKey = (obj, fullKey, prop = null) => { + const getValueForFullKey = (obj, fullKey) => { const [groupKey, subKey] = fullKey.split('.'); if (!groupKey || !subKey) { throw new Error(`Expected group key and subkey (got ${fullKey})`); } - if (!obj.hasOwnProperty(groupKey)) { + if (!Object.hasOwn(obj, groupKey)) { throw new Error(`Expected valid group key (got ${groupKey})`); } const group = obj[groupKey]; - if (!group.hasOwnProperty(subKey)) { + if (!Object.hasOwn(group, subKey)) { throw new Error( `Expected valid subkey (got ${subKey} for group ${groupKey})` ); |