From 08b700bb14e5e12c1dff283e2eef729816a97f15 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Sun, 26 Jun 2022 20:57:06 -0300 Subject: lots of fixes from eslint --- src/util/urls.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/util/urls.js') 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})` ); -- cgit 1.3.0-6-gf8a5