Skip to content

Commit bb083ce

Browse files
agustin-tiendanubektsn
authored andcommitted
Mini fix in rootState example. (vuejs#629)
* Mini fix in rootState example. Maybe I misunderstood the example, but without parenthesis the `%` operator will be executed before the `+`. * Update modules.md
1 parent d85d5f2 commit bb083ce

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/en/modules.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ const moduleA = {
5858
// ...
5959
actions: {
6060
incrementIfOddOnRootSum ({ state, commit, rootState }) {
61-
if (state.count + rootState.count % 2 === 1) {
61+
if ((state.count + rootState.count) % 2 === 1) {
6262
commit('increment')
6363
}
6464
}

0 commit comments

Comments
 (0)