-
Notifications
You must be signed in to change notification settings - Fork 407
Zone.js Does not support creating Error objects without new oberator #555
Comments
I think it is my mistake, I didn't return this in PR #547, I'll make a PR now. |
…structor, and copy native error's properties
I was trying to fix this as well, it seems that the issue does not reproduce normally in the test environment. I believe instead of using I'm not sure how you would like to fix the issue that test env does not reflect runtime env in regard to 'use strict'. I guess it needs to fit into a bigger puzzle with the distribution. |
@KrauseStefan , yeah, without use strict, this will be global, and with use strict, this will become undefined. I just try to add some logic to deal with it. |
…otype chain and can be called without new
This is fixed long ago, I will close. |
When running protractor with angular2 Dependency injection and therefore using zone.js I get the following error:
The line producing errors in zone.js:
zone.js/lib/zone.ts
Line 1320 in 610649b
Example of a place where Error is called without new: https://github.com/SeleniumHQ/selenium/blob/ba56ad1ae0b98a1fe1efdd2163c62fc847950178/javascript/node/selenium-webdriver/lib/promise.js#L714
We can agree that it would be best practice to use new, but I think zone.js if it forces wrapping the Error class should work the same way.
The text was updated successfully, but these errors were encountered: