0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-24 20:42:43 +00:00

fix autosave default

This commit is contained in:
Gazook89
2022-10-19 11:45:47 -05:00
parent 2bad0bfcb0
commit 1801691f49

View File

@@ -78,7 +78,7 @@ const EditPage = createClass({
this.savedBrew = JSON.parse(JSON.stringify(this.props.brew)); //Deep copy
this.setState({ autoSave: JSON.parse(localStorage.getItem('AUTOSAVE_ON')) }, ()=>{
this.setState({ autoSave: localStorage.getItem('AUTOSAVE_ON') ? JSON.parse(localStorage.getItem('AUTOSAVE_ON')) : true }, ()=>{
if(this.state.autoSave){
this.trySave();
} else {