Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(lib): use new when creating error #205

Closed
wants to merge 1 commit into from
Closed

Conversation

Fdawgs
Copy link
Member

@Fdawgs Fdawgs commented Jan 9, 2025

Want that prototype chain by calling as constructor rather than as a function.

Checklist

Signed-off-by: Frazer Smith <frazer.dev@icloud.com>
Copy link
Member

@jsumners jsumners left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you clarify this? There shouldn't be any difference between the two.

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/Error

@Fdawgs
Copy link
Member Author

Fdawgs commented Jan 9, 2025

Right you are, having a brain fart as used to using new for others builtin objects.

@Fdawgs Fdawgs closed this Jan 9, 2025
@Fdawgs Fdawgs deleted the Fdawgs-patch-1 branch January 9, 2025 21:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants