Merge pull request #4709 from benjiwheeler/projects-editor-pushstate

Keep URI correct when uploading project while signed out
This commit is contained in:
Benjamin Wheeler authored and GitHub committed 2019-04-01 14:23:33 -04:00
commit 021063470d
1 file changed
-6
-6
View File
@@ -118,12 +118,6 @@ class SBFileUploader extends React.Component {
const filename = this.fileToUpload && this.fileToUpload.name;
this.props.vm.loadProject(this.reader.result)
.then(() => {
// Remove the hash if any (without triggering a hash change event or a reload)
try { // Can fail e.g. when GUI is loaded from static file (integration tests)
history.replaceState({}, document.title, '.');
} catch {
// No fallback, just do not trigger promise catch below
}
this.props.onLoadingFinished(this.props.loadingState, true);
// Reset the file input after project is loaded
// This is necessary in case the user wants to reload a project