fix(core): __symbol__ should return __zone_symbol__ without zone.js loaded (#19541)

This commit is contained in:
JiaLiPassion
2017-11-03 08:06:06 +09:00
committed by Victor Berchet
parent a897d6842f
commit 678d1cfae1

View File

@ -22,8 +22,8 @@ import {EventManagerPlugin} from './event_manager';
* addEventListener by 3x. * addEventListener by 3x.
*/ */
const __symbol__ = const __symbol__ =
(typeof Zone !== 'undefined') && (Zone as any)['__symbol__'] || function<T>(v: T): T { (typeof Zone !== 'undefined') && (Zone as any)['__symbol__'] || function(v: string): string {
return v; return '__zone_symbol__' + v;
}; };
const ADD_EVENT_LISTENER: 'addEventListener' = __symbol__('addEventListener'); const ADD_EVENT_LISTENER: 'addEventListener' = __symbol__('addEventListener');
const REMOVE_EVENT_LISTENER: 'removeEventListener' = __symbol__('removeEventListener'); const REMOVE_EVENT_LISTENER: 'removeEventListener' = __symbol__('removeEventListener');