« get me outta code hell

hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/data
diff options
context:
space:
mode:
Diffstat (limited to 'src/data')
-rw-r--r--src/data/yaml.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/data/yaml.js b/src/data/yaml.js
index 2c3c988d..e18b7334 100644
--- a/src/data/yaml.js
+++ b/src/data/yaml.js
@@ -31,6 +31,7 @@ import {color, ENABLE_COLOR, logInfo, logWarn} from '../util/cli.js';
 
 import {
   decorateErrorWithIndex,
+  empty,
   mapAggregate,
   openAggregate,
   showAggregate,
@@ -143,7 +144,7 @@ function makeProcessDocument(
       .map(([field]) => field)
       .filter((field) => !knownFields.includes(field));
 
-    if (unknownFields.length) {
+    if (!empty(unknownFields)) {
       throw new makeProcessDocument.UnknownFieldsError(unknownFields);
     }
 
@@ -1253,7 +1254,7 @@ export function filterDuplicateDirectories(wikiData) {
             directoryPlaces[directory] = [thing];
           }
         }
-        if (!duplicateDirectories.length) return;
+        if (empty(duplicateDirectories)) return;
         duplicateDirectories.sort((a, b) => {
           const aL = a.toLowerCase();
           const bL = b.toLowerCase();