mirror of
https://github.com/LCPQ/QUESTDB_website.git
synced 2024-12-25 05:43:46 +01:00
Fix null array in yaml (#13)
* Fix broken link * Fix bug in indexDB * Fix sourceFile for each geometry * Fix null array in yaml Co-authored-by: Mickaël Véril <mveril@irsamc.ups-tlse.fr>
This commit is contained in:
parent
24241a1207
commit
bebcfdd959
@ -8,9 +8,9 @@ class indexDB {
|
|||||||
var site_url = "/"+window.location.pathname.split('/')[1];
|
var site_url = "/"+window.location.pathname.split('/')[1];
|
||||||
const text = await getTextFromFileUrlAsync(site_url+"/data/index.yaml",{"Cache-Control":`max-age=${maxAge}`})
|
const text = await getTextFromFileUrlAsync(site_url+"/data/index.yaml",{"Cache-Control":`max-age=${maxAge}`})
|
||||||
const myYaml = jsyaml.load(text);
|
const myYaml = jsyaml.load(text);
|
||||||
db.sets = ((myYaml.sets === undefined) ? new Map() : new Map(Object.entries(myYaml.sets)));
|
db.sets = ((myYaml.sets == null) ? new Map() : new Map(Object.entries(myYaml.sets)));
|
||||||
db.others = ((myYaml.others === undefined) ? [] : Array.from(myYaml.others));
|
db.others = ((myYaml.others == null) ? [] : Array.from(myYaml.others));
|
||||||
db.reviews = ((myYaml.reviews === undefined) ? [] : Array.from(myYaml.reviews));
|
db.reviews = ((myYaml.reviews == null) ? [] : Array.from(myYaml.reviews));
|
||||||
window.indexDB=db
|
window.indexDB=db
|
||||||
return db
|
return db
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user