0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-25 18:22:42 +00:00

Set brew state to exactly match savedBrew

This commit is contained in:
G.Ambatte
2025-02-15 00:12:55 +13:00
parent 34a0b4eb05
commit 2cb8b5d014

View File

@@ -256,13 +256,8 @@ const EditPage = createClass({
};
history.replaceState(null, null, `/edit/${this.savedBrew.editId}`);
this.setState((prevState)=>({
brew : { ...prevState.brew,
googleId : this.savedBrew.googleId ? this.savedBrew.googleId : null,
editId : this.savedBrew.editId,
shareId : this.savedBrew.shareId,
version : this.savedBrew.version
},
this.setState(()=>({
brew : this.savedBrew,
isPending : false,
isSaving : false,
unsavedTime : new Date()