Skip to content

Commit aa03d3b

Browse files
authored
project-fetcher-hoc.jsx -- clear url when creating new projects
1 parent ec3f03b commit aa03d3b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/lib/project-fetcher-hoc.jsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,11 @@ const ProjectFetcherHOC = function (WrappedComponent) {
114114
this.props.vm.clear();
115115
this.props.vm.stop();
116116

117+
// pm: clear url params when fetching if the project ID is 'default'
118+
if (projectId == 0 || projectId === null) {
119+
const path = window.location.pathname + window.location.hash;
120+
window.history.replaceState({}, document.title, path);
121+
}
117122
let assetPromise;
118123
// In case running in node...
119124
let projectUrl = typeof URLSearchParams === 'undefined' ?

0 commit comments

Comments
 (0)