Skip to content

Commit

Permalink
When jumping from browse to sketch, pick the right schema
Browse files Browse the repository at this point in the history
  • Loading branch information
dabreegster committed Oct 2, 2024
1 parent 4a92614 commit b459d36
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/lib/browse/schemes/InterventionPopup.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,15 @@
};
gj.schemes[scheme.scheme_reference] = scheme;
let filename = scheme.browse?.authority_or_region || "unknown authority";
// Assuming the schema is always v1
let schema = scheme.pipeline ? "pipeline" : "v1";
if (schema == "pipeline") {
filename += "_pipeline";
}
// Put the file in local storage, so it'll be loaded from the next page
setLocalStorageItem(filename, JSON.stringify(gj));
window.open(
`scheme.html?authority=${scheme.browse?.authority_or_region}`,
`scheme.html?authority=${scheme.browse?.authority_or_region}&schema=${schema}`,
"_blank",
);
}
Expand Down

0 comments on commit b459d36

Please sign in to comment.