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 613a9e3672
commit a28d616e10
1 changed files with 3 additions and 3 deletions

View File

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