fix(task): fix #832, fix #835, task.data should be an object#834
fix(task): fix #832, fix #835, task.data should be an object#834mhevery merged 3 commits intoangular:masterfrom
Conversation
| @@ -24,6 +29,9 @@ export const ZONE_SYMBOL_PREFIX = '__zone_symbol__'; | |||
|
|
|||
| const EVENT_NAME_SYMBOL_REGX = /^__zone_symbol__(\w+)(true|false)$/; | |||
There was a problem hiding this comment.
since you are already creating TRUE_STR and FALSE_STR on line 10 and line 11, why not reuse those consts here by generating the regex with something like
let evt_name_sym_regx = new RegExp('^__zone_symbol__(\\w+)(' +TRUE_STR + '|' + FALSE_STR + ')\$');
There was a problem hiding this comment.
@kgentes , yes, you are right, I just checked again, because this regx is just initialized once, so I think it is ok to not reuse TRUE_STR and FALSE_STR. It will be more readable.
|
@kgentes , thank you for review, the code is a little difficult to understand than the earlier version because of the performance concern. |
|
|
||
| const EVENT_NAME_SYMBOL_REGX = /^__zone_symbol__(\w+)(true|false)$/; | ||
|
|
||
| const _global = |
There was a problem hiding this comment.
can we get global from __load_patch? I would prefer to have the global logic centralized.
There was a problem hiding this comment.
@mhevery , I have changed the structure and let patchEventTargetMethods to use the _global from __load_patch, and travis CI has passed, please review.
fix #832.
fix #835.