Fix localstorage key (#2815)

This commit is contained in:
Ben Halpern 2019-05-13 15:27:42 -04:00 committed by GitHub
parent e54d4c915d
commit ab344801db
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -179,7 +179,8 @@ export default class ArticleForm extends Component {
};
removeLocalStorage = () => {
localStorage.removeItem(this.url);
const {version} = this.state
localStorage.removeItem(`editor-${version}-${this.url}`);
window.removeEventListener('beforeunload', this.localStoreContent);
};