docs
docs copied to clipboard
Add-caveat-about-OR-and-empty-values.mdx
Add clarification about filtering with the OR operator and empty values
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Updated |
---|---|---|---|
docs | ✅ Ready (Inspect) | Visit Preview | Oct 24, 2022 at 0:56AM (UTC) |
This PR changes the following pages (Vercel Preview Deploy links):
Changed Vercel links
(Note that links will only be valid after Vercel preview deploy succeeded)
Looking at this issue again, I've got too focussed on the notion of empty strings, which is irrelevant here - and, from a chat with @aqrln - I realize that empty strings produce expected behavior.
The issue here is with the user's error message when they tried to filter on a string[] array by passing undefined
- they got an error, instead of the behavior as described in the doc. However, the doc section in question is about filter used with conditionals, and this wasn't what the user was doing. The docs section is clear about that. Therefore, this isn't a docs error, but we could maybe signpost the user's issue better in our VSCode plugin.