Skip to content

Commit 10a9bb0

Browse files
committed
fix: removed time cache break in replace state as it is escaped and breaks loading of the catalog; removed default catalog fallback
1 parent 3ef33d7 commit 10a9bb0

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/main.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,12 @@ function assignStacEndpoint() {
192192
console.warn(
193193
"[eodash-preview-instance] stacEndpoint not assigned, using default",
194194
);
195-
return "https://esa-eodashboards.github.io/eodashboard-catalog/trilateral/catalog.json";
195+
/*
196+
TODO: we should evaluate how to handle if stacEndpoint is not set, having a default
197+
endpoint is not a good idea, it should show an error message instead
198+
setting it to an empty string for now
199+
*/
200+
return "";
196201
}
197202

198203
window.addEventListener("message", (event) => {
@@ -206,7 +211,7 @@ window.addEventListener("message", (event) => {
206211
console.log("stacEndpoint from parent:", stacEndpoint);
207212
if (stacEndpoint && stacEndpoint.endsWith("catalog.json")) {
208213
const urlParams = new URLSearchParams(window.location.search);
209-
urlParams.set("stacEndpoint", stacEndpoint + "?t=" + Date.now());
214+
urlParams.set("stacEndpoint", stacEndpoint);
210215
window.history.replaceState({}, "", `?${urlParams}`);
211216
window.location.reload();
212217
console.log(

0 commit comments

Comments
 (0)