Permalink
Browse files

fixed first object ready bug

  • Loading branch information...
1 parent f2e5f1c commit 7c8b98f29f1668b8f378757968752dc96da8735b @substack committed Jan 2, 2012
Showing with 2 additions and 2 deletions.
  1. +1 −1 index.js
  2. +1 −1 package.json
View
@@ -27,7 +27,7 @@ OrderedEmitter.prototype.emit = function (name, obj) {
next[name] ++;
emit();
- while (queue[name][next[name]]) {
+ while (queue[name] && queue[name][next[name]]) {
queue[name][next[name]]();
delete queue[name][next[name]];
next[name] ++;
View
@@ -1,6 +1,6 @@
{
"name" : "ordered-emitter",
- "version" : "0.0.0",
+ "version" : "0.0.1",
"description" : "emit events in order",
"main" : "index.js",
"directories" : {

0 comments on commit 7c8b98f

Please sign in to comment.