refactor(jqLite): remove code duplication

This commit is contained in:
Igor Minar
2014-08-04 20:14:15 -07:00
parent 2a5dbbdc52
commit 01b10d7a24

View File

@@ -783,9 +783,9 @@ forEach({
var eventFns = events[type];
if (!eventFns) {
if (type == 'mouseenter' || type == 'mouseleave') {
events[type] = [];
events[type] = [];
if (type == 'mouseenter' || type == 'mouseleave') {
// Refer to jQuery's implementation of mouseenter & mouseleave
// Read about mouseenter and mouseleave:
// http://www.quirksmode.org/js/events_mouse.html#link8
@@ -801,7 +801,6 @@ forEach({
} else {
addEventListenerFn(element, type, handle);
events[type] = [];
}
eventFns = events[type];
}