Skip to content

Commit 0210634

Browse files
authored
Merge pull request scratchfoundation#4709 from benjiwheeler/projects-editor-pushstate
Keep URI correct when uploading project while signed out
2 parents ce6df36 + 2b51961 commit 0210634

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

src/containers/sb-file-uploader.jsx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -118,12 +118,6 @@ class SBFileUploader extends React.Component {
118118
const filename = this.fileToUpload && this.fileToUpload.name;
119119
this.props.vm.loadProject(this.reader.result)
120120
.then(() => {
121-
// Remove the hash if any (without triggering a hash change event or a reload)
122-
try { // Can fail e.g. when GUI is loaded from static file (integration tests)
123-
history.replaceState({}, document.title, '.');
124-
} catch {
125-
// No fallback, just do not trigger promise catch below
126-
}
127121
this.props.onLoadingFinished(this.props.loadingState, true);
128122
// Reset the file input after project is loaded
129123
// This is necessary in case the user wants to reload a project

0 commit comments

Comments
 (0)