Skip to content
Browse files

don't emit change events if first initialized

  • Loading branch information...
1 parent 1da43ed commit a827cd4ad24fd537cbc9439325c4f05cf1e11f94 @matthewmueller matthewmueller committed Dec 12, 2012
Showing with 1 addition and 2 deletions.
  1. +1 −2 lib/index.js
View
3 lib/index.js
@@ -34,9 +34,8 @@ function createModel(name) {
function model(attrs) {
if (!(this instanceof model)) return new model(attrs);
this._callbacks = {};
- this.attrs = {};
+ this.attrs = attrs || {};
this.dirty = {};
- if (attrs) this.set(attrs);
@karlbohlmark
karlbohlmark added a note Jan 8, 2013

This makes it less straight-forward to implement a plugin for supporting nested models, since it's no longer enough to monkey patch model.prototype.set into doing the appropriate constructor invocations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
}
// mixin emitte

0 comments on commit a827cd4

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