Skip to content
This repository has been archived by the owner on Aug 5, 2020. It is now read-only.

Commit

Permalink
When final output result is presented, mobject logging removes intern…
Browse files Browse the repository at this point in the history
…al object properties. Ensure that iteration over these properties is stopped.
  • Loading branch information
Roman Rudenko committed Jun 7, 2012
1 parent a143e25 commit 8190292
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion api/mObject.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ MObject.prototype = {
, _attemptCompletion: function() {
if (this.done()) {
var completer;
while (completer = this._on.complete.shift()) {
while (this._on && (completer = this._on.complete.shift())) {
completer.call(this);
}
}
Expand All @@ -149,6 +149,7 @@ MObject.prototype = {
var done = function(extender) {
if (extender) mobject.add(extender);

if (!mobject._outstanding) return;
var index = mobject._outstanding.indexOf(init);
mobject._outstanding.splice(index, 1);
mobject._attemptCompletion();
Expand Down

0 comments on commit 8190292

Please sign in to comment.