Permalink
Browse files

whengetting pending command delete it directly!

  • Loading branch information...
1 parent 1688892 commit 752b10ba0c8903e09feb5b28c3f52b6a2d99df45 @adrai committed Mar 15, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/observer.js
View
@@ -30,7 +30,9 @@ Observer.prototype = {
//
// - __commandId:__ the command id
getPendingCommand: function(commandId) {
- return this.commands[commandId];
+ var callback = this.commands[commandId];
+ delete this.commands[commandId];
+ return callback;
}
};

0 comments on commit 752b10b

Please sign in to comment.