optimize fire event in V8 when there are no context listeners
This commit is contained in:
parent
57a0866bcf
commit
5b77ec33de
@ -143,6 +143,8 @@ L.Mixin.Events = {
|
|||||||
// fire event for the context-indexed listeners as well
|
// fire event for the context-indexed listeners as well
|
||||||
typeIndex = events[type + '_idx'];
|
typeIndex = events[type + '_idx'];
|
||||||
|
|
||||||
|
if (!typeIndex) { return this; }
|
||||||
|
|
||||||
for (contextId in typeIndex) {
|
for (contextId in typeIndex) {
|
||||||
listeners = typeIndex[contextId].slice();
|
listeners = typeIndex[contextId].slice();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user