mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-03 01:52:42 +00:00
Small logic simplification
This commit is contained in:
@@ -78,7 +78,7 @@ const EditPage = createClass({
|
|||||||
|
|
||||||
this.savedBrew = JSON.parse(JSON.stringify(this.props.brew)); //Deep copy
|
this.savedBrew = JSON.parse(JSON.stringify(this.props.brew)); //Deep copy
|
||||||
|
|
||||||
this.setState({ autoSave: localStorage.getItem('AUTOSAVE_ON') ? JSON.parse(localStorage.getItem('AUTOSAVE_ON')) : true }, ()=>{
|
this.setState({ autoSave: JSON.parse(localStorage.getItem('AUTOSAVE_ON')) ?? true }, ()=>{
|
||||||
if(this.state.autoSave){
|
if(this.state.autoSave){
|
||||||
this.trySave();
|
this.trySave();
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user