mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-04 16:52:38 +00:00
Set brew state to exactly match savedBrew
This commit is contained in:
@@ -256,13 +256,8 @@ const EditPage = createClass({
|
|||||||
};
|
};
|
||||||
history.replaceState(null, null, `/edit/${this.savedBrew.editId}`);
|
history.replaceState(null, null, `/edit/${this.savedBrew.editId}`);
|
||||||
|
|
||||||
this.setState((prevState)=>({
|
this.setState(()=>({
|
||||||
brew : { ...prevState.brew,
|
brew : this.savedBrew,
|
||||||
googleId : this.savedBrew.googleId ? this.savedBrew.googleId : null,
|
|
||||||
editId : this.savedBrew.editId,
|
|
||||||
shareId : this.savedBrew.shareId,
|
|
||||||
version : this.savedBrew.version
|
|
||||||
},
|
|
||||||
isPending : false,
|
isPending : false,
|
||||||
isSaving : false,
|
isSaving : false,
|
||||||
unsavedTime : new Date()
|
unsavedTime : new Date()
|
||||||
|
|||||||
Reference in New Issue
Block a user