diff --git a/static/js/GeometriesLoader.js b/static/js/GeometriesLoader.js index 2df41181..4370c432 100644 --- a/static/js/GeometriesLoader.js +++ b/static/js/GeometriesLoader.js @@ -6,11 +6,11 @@ class GeometriesLoader{ const myset=item.set.split("#").join("") try { const mol=await Geometry.loadXYZAsync(`/${myset}/${mymol}.xyz`) - xyzs.push(mol) + xyzs.push(mol) } catch (error) { console.error("Geometry not found",item) - } + } } return xyzs.flat() } -} \ No newline at end of file +} diff --git a/static/js/Geometry.js b/static/js/Geometry.js index f0e26c5c..7d9734a4 100644 --- a/static/js/Geometry.js +++ b/static/js/Geometry.js @@ -6,9 +6,8 @@ class Geometry { static async loadXYZAsync(file) { switch (trueTypeOf(file)) { case String.name: - file = getFullDataPath("/structures/"+file) - const maxAge= (DebugMode.Enabled,0,600) - var str = await getTextFromFileUrlAsync(file,{"Cache-Control":`max-age=${maxAge}`}) + file = getFullDataPath("structures"+file) + var str = getTextFromFileUrl(file) break; case File.name: var str = await getTextFromUploadedFileAsync(file) @@ -33,4 +32,4 @@ class Geometry { } return geoms } -} \ No newline at end of file +} diff --git a/static/js/data.js b/static/js/data.js index 8e9148a6..e259d8ff 100644 --- a/static/js/data.js +++ b/static/js/data.js @@ -281,7 +281,7 @@ class dataFileBase { file = getFullDataPath(file) // const maxAge= (DebugMode.Enabled,0,600) // var str = await getTextFromFileUrlAsync(file,{"Cache-Control":`max-age=${maxAge}`}) - var str = await getTextFromFileUrl(file) + var str = getTextFromFileUrl(file) break; case File.name: var str = await getTextFromUploadedFileAsync(file)