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

strictNullHandling not working when using a custom filter. #278

Closed
Neaox opened this issue Sep 16, 2018 · 1 comment
Closed

strictNullHandling not working when using a custom filter. #278

Neaox opened this issue Sep 16, 2018 · 1 comment

Comments

@Neaox
Copy link
Contributor

Neaox commented Sep 16, 2018

When using a custom filter thenstrictNullHandling does not work.

@Neaox
Copy link
Contributor Author

Neaox commented Sep 17, 2018

An explanation of the issue:

If you specify a custom filter in your stringify options the if case here (https://github.com/ljharb/qs/pull/279/files/ab07ce71f33704ecfac7298b055be8f481edf277#diff-dd5072864997b356b1727023f837c921L48) is run. Due the statement on line 52 (https://github.com/ljharb/qs/pull/279/files/ab07ce71f33704ecfac7298b055be8f481edf277#diff-dd5072864997b356b1727023f837c921L52) being an else if, instead of an if the null handling is not run, which then causes an error when attemping to get the keys of a null object.

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

No branches or pull requests

1 participant