Skip to content

Commit

Permalink
warning if pattern from url param is not found
Browse files Browse the repository at this point in the history
  • Loading branch information
adkinsrs committed Aug 26, 2024
1 parent 04ab2b1 commit ed89071
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions www/js/projection.js
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,10 @@ const parsePatternCartURLParams = async () => {
}
urlParamsPassed = true;
const foundPattern = flatPatternsCartData.find((p) => p.share_id === pattern);
if (!foundPattern) {
console.warn(`Pattern ${pattern} not found in pattern cart data. Perhaps the user does not have access to it.`);
return;
}
selectedPattern = {shareId: foundPattern.share_id, label: foundPattern.label, gctype: foundPattern.gctype, selectedWeights: []};

// Update proxy so that multi-gene radio button can be enabled/disabled
Expand Down

0 comments on commit ed89071

Please sign in to comment.