Skip to content

Commit

Permalink
Fix localstorage key (forem#2815)
Browse files Browse the repository at this point in the history
  • Loading branch information
benhalpern authored May 13, 2019
1 parent e54d4c9 commit ab34480
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/javascript/article-form/articleForm.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
};

Expand Down

0 comments on commit ab34480

Please sign in to comment.