_.each doesn't work on false all of a sudden

(but still works on `null`)
This commit is contained in:
David Greenspan
2013-10-07 10:28:23 -07:00
parent 2378cbfbdc
commit 3f93c386ce

View File

@@ -1206,7 +1206,7 @@ _extend(UI.Component, {
UI.Component.parented = function () {
var self = this;
for (var comp = self; comp; comp = comp._super) {
var events = comp.hasOwnProperty('_events') && comp._events;
var events = (comp.hasOwnProperty('_events') && comp._events) || null;
_.each(events, function (esh) { // {events, selector, handler}
// wrap the handler here, per instance of the template that
// declares the event map, so we can pass the instance to