Skip to content

Commit

Permalink
fix(model): use lodash isEqual to check if a model is dirty (#384)
Browse files Browse the repository at this point in the history
  • Loading branch information
benjamincanac authored and thetutlage committed Sep 13, 2018
1 parent 23dc3eb commit 88fe6ea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Lucid/Model/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ class Model extends BaseModel {
*/
get dirty () {
return _.pickBy(this.$attributes, (value, key) => {
return _.isUndefined(this.$originalAttributes[key]) || this.$originalAttributes[key] !== value
return _.isUndefined(this.$originalAttributes[key]) || !_.isEqual(this.$originalAttributes[key], value)
})
}

Expand Down

0 comments on commit 88fe6ea

Please sign in to comment.