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

Add support for defined but not implemented Symbol.for #252

Merged
merged 3 commits into from
Aug 14, 2020
Merged

Add support for defined but not implemented Symbol.for #252

merged 3 commits into from
Aug 14, 2020

Conversation

maxfortun
Copy link
Contributor

Symbol.for is defined but not implemented in NGINX njs plugin and throws exception.

err InternalError: not implemented
at Symbol.for (native)

http://hg.nginx.org/njs/file/default/src/njs_symbol.c#l174

Suggestion for

bn.js/lib/bn.js

Line 373 in 5707aed

BN.prototype[Symbol.for('nodejs.util.inspect.custom')] = inspect;

Wrap in try/catch block and revert to BN.prototype.inspect = inspect; on error.

@maxfortun maxfortun closed this Aug 13, 2020
@maxfortun maxfortun reopened this Aug 13, 2020
@maxfortun
Copy link
Contributor Author

maxfortun commented Aug 13, 2020

fixes #251

@fanatid fanatid merged commit 90573ef into indutny:master Aug 14, 2020
@fanatid
Copy link
Collaborator

fanatid commented Aug 14, 2020

LGTM, thank you!

@fanatid
Copy link
Collaborator

fanatid commented Aug 14, 2020

Released as v5.1.3.

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