Skip to content

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

Merged
fanatid merged 3 commits intoindutny:masterfrom
maxfortun:master
Aug 14, 2020
Merged

Add support for defined but not implemented Symbol.for#252
fanatid merged 3 commits intoindutny:masterfrom
maxfortun:master

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