Fix new issue with Emitter unit tests.

This commit is contained in:
Jürg Lehni 2016-06-18 23:14:48 +02:00
parent f133475405
commit cc55991b66

View file

@ -81,8 +81,8 @@ var Emitter = {
if (!handlers)
return false;
var args = [].slice.call(arguments, 1),
setTarget = event && 'target' in event &&
!('currentTarget' in event);
setTarget = event && typeof event === 'object' && 'target' in event
&& !('currentTarget' in event);
// Create a clone of the handlers list so changes caused by on / off
// won't throw us off track here:
handlers = handlers.slice();