Skip to content

Commit

Permalink
rearranging order of when analysis are allowed to be run
Browse files Browse the repository at this point in the history
  • Loading branch information
adkinsrs committed Sep 11, 2024
1 parent 7a22ea0 commit e566064
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions www/js/sc_workbench.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,11 @@ const datasetTree = new DatasetTree({
currentAnalysis = new Analysis({id: datasetId, type: "primary", datasetIsRaw: true});

try {
document.querySelector(UI.analysisSelect).disabled = true;
analysisLabels = await currentAnalysis.getSavedAnalysesList(datasetId, -1, 'sc_workbench');
document.querySelector(UI.analysisSelect).disabled = false;
} catch (error) {
createToast("Failed to access analyses for this dataset");
logErrorInConsole(error);
document.querySelector(UI.analysisSelect).disabled = true;
}

document.querySelector(UI.primaryInitialInfoSection).classList.remove("is-hidden");
Expand All @@ -96,11 +95,16 @@ const datasetTree = new DatasetTree({
await currentAnalysis.loadPreliminaryFigures(); // depends on dataset.id from getDatasetInfo
} catch (error) {
logErrorInConsole(error);

// Cannot run analyses without a dataset
document.querySelector(UI.analysisSelect).disabled = true;
// pass
} finally {
document.querySelector(UI.primaryInitialPlotContainer).classList.add("is-hidden");
}

document.querySelector(UI.analysisSelect).disabled = false;

})
});

Expand Down

0 comments on commit e566064

Please sign in to comment.