guardian / scribe

DEPRECATED: A rich text editor framework for the web platform
http://guardian.github.io/scribe/
Apache License 2.0
3.5k stars 245 forks source link

`EventEmitter.prototype.off` doesn't work #370

Closed rf- closed 9 years ago

rf- commented 9 years ago

Relevant code:

  EventEmitter.prototype.off = function (eventName, fn) {
    var listeners = this._listeners[eventName] || Immutable.Set();
    if (fn) {
      listeners = listeners.delete(fn);
    } else {
      listeners = listeners.clear();
    }
  };

Assigning to the local listeners var doesn't actually affect the value of this._listeners[eventName].

rf- commented 9 years ago

I would start opening PRs for this stuff, but right now I don't have a working dev environment for Scribe set up. I'll try to do that soon.

cutandpastey commented 9 years ago

@rf- Thanks for the heads up, fixed in https://github.com/guardian/scribe/pull/372.