diff --git a/static/js/indexDB.js b/static/js/indexDB.js index 0e123cf5..05d6185d 100644 --- a/static/js/indexDB.js +++ b/static/js/indexDB.js @@ -8,9 +8,9 @@ class indexDB { var site_url = "/"+window.location.pathname.split('/')[1]; const text = await getTextFromFileUrlAsync(site_url+"/data/index.yaml",{"Cache-Control":`max-age=${maxAge}`}) const myYaml = jsyaml.load(text); - db.sets = ((myYaml.sets === undefined) ? new Map() : new Map(Object.entries(myYaml.sets))); - db.others = ((myYaml.others === undefined) ? [] : Array.from(myYaml.others)); - db.reviews = ((myYaml.reviews === undefined) ? [] : Array.from(myYaml.reviews)); + db.sets = ((myYaml.sets == null) ? new Map() : new Map(Object.entries(myYaml.sets))); + db.others = ((myYaml.others == null) ? [] : Array.from(myYaml.others)); + db.reviews = ((myYaml.reviews == null) ? [] : Array.from(myYaml.reviews)); window.indexDB=db return db }