« get me outta code hell

hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/util/urls.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/urls.js')
-rw-r--r--src/util/urls.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/util/urls.js b/src/util/urls.js
index ce747df..45ec4c8 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})`
       );