Skip to content

Commit

Permalink
Throw an error when an unknown mutation is requested
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewminer committed Mar 19, 2020
1 parent 4d7f390 commit 210aede
Show file tree
Hide file tree
Showing 4 changed files with 18,849 additions and 3 deletions.
2 changes: 1 addition & 1 deletion dist/vuex.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ Store.prototype.commit = function commit (_type, _payload, _options) {
var entry = this._mutations[type];
if (!entry) {
if (process.env.NODE_ENV !== 'production') {
console.error(("[vuex] unknown mutation type: " + type));
throw new Error(("[vuex] unknown mutation type: " + type))
}
return
}
Expand Down
Loading

0 comments on commit 210aede

Please sign in to comment.