Skip to content

Commit

Permalink
Merge pull request #384 from pedrosanta/context-remove-var-collision
Browse files Browse the repository at this point in the history
Update context 'remove' flag var name to avoid collision with 'text' OT type method
  • Loading branch information
nateps committed Jul 18, 2015
2 parents f13fd2b + 2f7bff7 commit e5ad849
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/client/doc.js
Original file line number Diff line number Diff line change
Expand Up @@ -675,7 +675,7 @@ Doc.prototype._otApply = function(opData, context) {
if (c != context && c._onOp) c._onOp(opData.op);
}
for (var i = 0; i < contexts.length; i++) {
if (contexts[i].remove) contexts.splice(i--, 1);
if (contexts[i].shouldBeRemoved) contexts.splice(i--, 1);
}

return this.emit('after op', opData.op, context);
Expand Down Expand Up @@ -996,7 +996,7 @@ Doc.prototype.createContext = function() {
//
// NOTE Why can't we destroy contexts immediately?
delete this._onOp;
this.remove = true;
this.shouldBeRemoved = true;
},

// This is dangerous, but really really useful for debugging. I hope people
Expand Down

0 comments on commit e5ad849

Please sign in to comment.