We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
null
accountFetcher
Promise
Looks like I have found a bug. When accountFetcher returns Promise there is no null checking.
Code example.
tokenize.validate(token, async (id, prefix) => { return null })
This code raises an exception TypeError: Cannot convert undefined or null to object.
TypeError: Cannot convert undefined or null to object
Here (https://github.com/cyyynthia/tokenize/blob/mistress/index.js#L117) we have checked for a null but in the case of Promise, this checking will pass value further. Later (https://github.com/cyyynthia/tokenize/blob/mistress/index.js#L120) it will pass the null to _finishValidation where the error raises.
_finishValidation
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Looks like I have found a bug. When
accountFetcher
returnsPromise
there is nonull
checking.Code example.
This code raises an exception
TypeError: Cannot convert undefined or null to object
.Here (https://github.com/cyyynthia/tokenize/blob/mistress/index.js#L117) we have checked for a
null
but in the case ofPromise
, this checking will pass value further. Later (https://github.com/cyyynthia/tokenize/blob/mistress/index.js#L120) it will pass thenull
to_finishValidation
where the error raises.The text was updated successfully, but these errors were encountered: