perf(Scope): exit $broadcast early if nobody is listening for the given event
This commit is contained in:
+5
-2
@@ -1148,8 +1148,11 @@ function $RootScopeProvider(){
|
||||
event.defaultPrevented = true;
|
||||
},
|
||||
defaultPrevented: false
|
||||
},
|
||||
listenerArgs = concat([event], arguments, 1),
|
||||
};
|
||||
|
||||
if (!target.$$listenerCount[name]) return event;
|
||||
|
||||
var listenerArgs = concat([event], arguments, 1),
|
||||
listeners, i, length;
|
||||
|
||||
//down while you can, then up and next sibling or up and next sibling until back at root
|
||||
|
||||
Reference in New Issue
Block a user