0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-01-07 03:22:38 +00:00

Always render currently-edited page first, so variables update across pages properly

This commit is contained in:
Trevor Buckner
2024-02-20 22:56:37 -05:00
parent 6870fd6d76
commit 7bb1f16946
4 changed files with 40 additions and 21 deletions

View File

@@ -113,7 +113,7 @@ const EditPage = createClass({
brew : { ...prevState.brew, text: text },
isPending : true,
htmlErrors : htmlErrors,
currentEditorPage : this.refs.editor.getCurrentPage()
currentEditorPage : this.refs.editor.getCurrentPage() - 1 //Offset index since Marked starts pages at 0
}), ()=>{if(this.state.autoSave) this.trySave();});
},