Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix regressions introduced by refactoring.

  • Loading branch information...
commit f8ed17f59e827acb073eeef4a908bebdd57e011f 1 parent 270df43
@Gozala authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 packages/api-utils/lib/event/core.js
View
4 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);
});
}
Please sign in to comment.
Something went wrong with that request. Please try again.