Closed StephenCleary closed 4 years ago
Can confirm via fiddle
The documentation for the module itself implies that undefined
is indeed the right value to return, and there's a test that backs this up
I've submitted a PR to address this: #423
I think the right fix here is to treat a null
in the same way the code currently treats undefined
and ""
@hoelzro thanks for the pull request, but I think we can take this opportunity to make the code match the documentation! I'll put together a change with a fix just now.
I've just pushed 2.3.8 which includes a fix for this issue, thanks for taking the time to report and to @hoelzro for investigating.
The documentation states "A pipeline function can indicate that the passed token should be discarded by returning null. This token will not be passed to any downstream pipeline functions and will not be added to the index."
However, the code checks for
undefined
or empty string, and will passnull
tokens through to the next pipeline function.