diff --git a/static/js/Geometry.js b/static/js/Geometry.js index 7d9734a4..f26c3215 100644 --- a/static/js/Geometry.js +++ b/static/js/Geometry.js @@ -14,7 +14,9 @@ class Geometry { break } var xyz = this.loadXYZString(str); - xyz.sourceFile = new websiteFile(file) + for (var geom of xyz){ + geom.sourceFile = new websiteFile(file) + } return xyz } static loadXYZString(text) { diff --git a/static/js/indexDB.js b/static/js/indexDB.js index fa97363d..554691f3 100644 --- a/static/js/indexDB.js +++ b/static/js/indexDB.js @@ -8,8 +8,8 @@ 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 === null) ? new Map() : new Map(Object.entries(myYaml.sets))); - db.others = ((myYaml.others === null) ? [] : Array.from(myYaml.others)); + db.sets = ((myYaml.sets === undefined) ? new Map() : new Map(Object.entries(myYaml.sets))); + db.others = ((myYaml.others === undefined) ? [] : Array.from(myYaml.others)); window.indexDB=db return db }