Permalink
Browse files

Fix regressions introduced by refactoring.

  • Loading branch information...
1 parent 270df43 commit f8ed17f59e827acb073eeef4a908bebdd57e011f @Gozala committed Feb 8, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 packages/api-utils/lib/event/core.js
@@ -36,7 +36,7 @@ function on(target, type, listener) {
if (typeof(listener) !== 'function')
throw new Error(BAD_LISTENER);
- if (!~listeners.indexOf(observers))
+ if (!~listeners.indexOf(listener))
listeners.push(listener);
}
exports.on = on;
@@ -53,7 +53,7 @@ exports.on = on;
*/
function once(target, type, listener) {
on(target, type, function observer() {
- removeListener(target, type, observer);
+ off(target, type, observer);
listener.apply(target, arguments);
});
}

0 comments on commit f8ed17f

Please sign in to comment.