fix(jqLite): forgive unregistration of a non-registered handler

This commit is contained in:
Pawel Kozlowski
2013-08-03 17:57:37 +02:00
parent ad2b8c5bd4
commit ab59cc6c44
2 changed files with 7 additions and 1 deletions

View File

@@ -212,7 +212,7 @@ function JQLiteOff(element, type, fn) {
removeEventListenerFn(element, type, events[type]);
delete events[type];
} else {
arrayRemove(events[type], fn);
arrayRemove(events[type] || [], fn);
}
});
}