diff --git a/package-lock.json b/package-lock.json index 6ea85b4..81c00f1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "diabloweb", - "version": "1.0.10", + "version": "1.0.11", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 066021e..b60c7d4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "diabloweb", - "version": "1.0.10", + "version": "1.0.11", "private": true, "dependencies": { "@babel/core": "7.4.3", diff --git a/src/App.js b/src/App.js index 4ac479f..7f1820d 100644 --- a/src/App.js +++ b/src/App.js @@ -121,7 +121,7 @@ class App extends React.Component { } onError(message, stack) { - this.setState({error: {message, stack}}); + this.setState(({error}) => !error && {error: {message, stack}}); } openKeyboard(open) { @@ -152,7 +152,9 @@ class App extends React.Component { } onExit() { - window.location = window.location; + if (!this.state.error) { + window.location.reload(); + } } setCurrentSave(name) {