Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Fix #546, #554, #555, the error should keep prototype chain and can be called without new #558

Closed
wants to merge 8 commits into from

Conversation

JiaLiPassion
Copy link
Collaborator

With the commit #547, the #546, error prototype issue was fixed, but a bigger issue occurs, that
Error object can be created with direct call.

let error = Error('message');

And the #547 PR will break it, cause a lot of errors, such as #554, #555

In this new PR, I checked the this exists or not and checked the this is global or not (non strict mode). So it should fix both #546 and #554, #555.

Please review, Thank you.

@JiaLiPassion JiaLiPassion deleted the issue-554 branch December 20, 2016 19:10
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants