bem / bem-bl

Base BEM library
http://bem.github.com/bem-bl/
198 stars 84 forks source link

$.observable.un with handlers hash and ctx not working #633

Open andre487 opened 9 years ago

andre487 commented 9 years ago

When we call un like this:

obs.un({
    event1: handler1,
    event2: handler2
}, ctx);

it does not works because the code does not make corrections in hash branch:

            } else {
                var _this = this;
                $.each(e, function(e, fn) {
                    _this.un(e, fn, ctx);
                });
            }

In this place the ctx var is always undefined because the right ctx is assigned to function's param fn.

Yeti-or commented 9 years ago

BEM-2250