Skip to content
Browse files

dirty if initialized with attrs

  • Loading branch information...
1 parent a827cd4 commit 905a98b09d0146abeeea4ef2bb4b0299a3d5f6ed @matthewmueller matthewmueller committed Dec 12, 2012
Showing with 3 additions and 2 deletions.
  1. +3 −2 lib/index.js
View
5 lib/index.js
@@ -33,9 +33,10 @@ function createModel(name) {
function model(attrs) {
if (!(this instanceof model)) return new model(attrs);
+ attrs = attrs || {};
this._callbacks = {};
- this.attrs = attrs || {};
- this.dirty = {};
+ this.attrs = attrs;
+ this.dirty = attrs;
}
// mixin emitte

0 comments on commit 905a98b

Please sign in to comment.
Something went wrong with that request. Please try again.