fix(dashboard): Remove edit from url params when discarding changes (#15709)

* Remove edit from url params

* Change replace to assign
This commit is contained in:
Geido 2021-07-22 21:58:43 +02:00 committed by GitHub
parent d4bec135e8
commit ebec353351
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -129,7 +129,10 @@ const StyledDashboardHeader = styled.div`
class Header extends React.PureComponent {
static discardChanges() {
window.location.reload();
const url = new URL(window.location.href);
url.searchParams.delete('edit');
window.location.assign(url);
}
constructor(props) {