JSON check in _getModuleControllersByElement() fails due to re-use of RegExp instance with global flag
mark-ettema opened this issue · comments
Mark Ettema commented
When the global flag is used for a RegExp, the lastindex property is updated for every successful match and reset to 0 when a test end without a result. Every test starts searching from that index.
In this case global flag can be omitted or the lastindex can manually set to 0 before using a new string to test.
Rik commented
Thanks! Will fix in next version.