Skip to content
Snippets Groups Projects
Commit 94dee121 authored by john's avatar john
Browse files

use patches for chapter alignment updates

parent da59733e
No related branches found
No related tags found
No related merge requests found
...@@ -14,8 +14,14 @@ class AlignmentBox extends React.Component { ...@@ -14,8 +14,14 @@ class AlignmentBox extends React.Component {
if (!includes(['left', 'right'], position)) return if (!includes(['left', 'right'], position)) return
chapter.alignment[position] = !chapter.alignment[position] const patch = {
update(chapter) alignment: chapter.alignment,
id: chapter.id
}
patch.alignment[position] = !chapter.alignment[position]
update(patch)
} }
render () { render () {
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment