Skip to content

Commit 0d001e1

Browse files
committed
fix: prevent demo dataset from overwriting user data on refresh
1 parent 43ad1fc commit 0d001e1

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/App.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,8 +175,8 @@ class App extends React.Component {
175175
}
176176

177177
initializeData = async () => {
178-
await this.checkUploadedDatasets();
179-
if (!this.state.uploadedDatasets[0]) {
178+
const datasets = await this.checkUploadedDatasets();
179+
if (!datasets[0]) {
180180
await this.checkForDemoFile();
181181
}
182182
};
@@ -449,6 +449,7 @@ class App extends React.Component {
449449
}
450450
}
451451
);
452+
return newUploadedDatasets.map((d) => d.status);
452453
};
453454

454455
renderUploadButton = (index) => {

0 commit comments

Comments
 (0)