Skip to content
This repository has been archived by the owner on Mar 13, 2018. It is now read-only.

Commit

Permalink
move addToAll to open()
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelw committed Dec 22, 2013
1 parent 7ce3cfa commit dfcd412
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/observe.js
Original file line number Diff line number Diff line change
Expand Up @@ -364,15 +364,14 @@
self.internalCallback_(records);
};
}

addToAll(this);
}

Observer.prototype = {
open: function(callback, target) {
if (this.state_ != UNOPENED)
throw Error('Observer has already been opened.');

addToAll(this);
this.callback_ = callback;
this.target_ = target;
this.state_ = OPENED;
Expand Down

0 comments on commit dfcd412

Please sign in to comment.