diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2022-06-26 20:57:06 -0300 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2022-06-26 20:57:06 -0300 |
commit | 08b700bb14e5e12c1dff283e2eef729816a97f15 (patch) | |
tree | 0494ff87d7ede3e0d7f561063c08c74011204486 /src/util/urls.js | |
parent | c6e9aba1f6d1239b3d884c2749d1f0d15c7662a1 (diff) |
lots of fixes from eslint
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})` ); |