diff --git a/src/actions/loadData.js b/src/actions/loadData.js index 5beaf4db0..a8aa6d5e9 100644 --- a/src/actions/loadData.js +++ b/src/actions/loadData.js @@ -299,7 +299,7 @@ Dataset.prototype.fetchSidecars = async function fetchSidecars() { .catch((reason) => Promise.resolve(reason)) } - if (!this.rootSequence) { + if (!mainJson.root_sequence && !this.rootSequence) { // Note that the browser may log a GET error if the above 404s this.rootSequence = fetchJSON(this.apiCalls.rootSequence) .catch((reason) => Promise.resolve(reason)) diff --git a/src/actions/recomputeReduxState.js b/src/actions/recomputeReduxState.js index 9c3ce592e..e1168b1e7 100644 --- a/src/actions/recomputeReduxState.js +++ b/src/actions/recomputeReduxState.js @@ -733,6 +733,11 @@ const createMetadataStateFromJSON = (json) => { if (json.meta.panels) { metadata.panels = json.meta.panels; } + if (json.root_sequence) { + /* A dataset may set the root sequence inline (i.e. within the main dataset JSON), which + we capture here. Alternatively it may be a sidecar JSON file */ + metadata.rootSequence = json.root_sequence; + } if (json.meta.display_defaults) { metadata.displayDefaults = {}; const jsonKeyToAuspiceKey = {