Skip to content

Commit

Permalink
Update GuidedUpload.js
Browse files Browse the repository at this point in the history
  • Loading branch information
garrettmflynn committed Sep 12, 2023
1 parent 665de6d commit 39bc950
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export class GuidedUploadPage extends Page {

beforeSave = () => {
const globalState = this.info.globalState;
const isNewDandiset = globalState.upload.dandiset_id !== this.localState.dandiset_id;
const isNewDandiset = globalState.upload?.dandiset_id !== this.localState.dandiset_id;
merge({ upload: this.localState }, globalState); // Merge the local and global states
if (isNewDandiset) delete globalState.upload.results; // Clear the preview results entirely if a new dandiset
};
Expand Down

0 comments on commit 39bc950

Please sign in to comment.