Can we introduce a safe inArray method that won't throw if the array length === 0? #2145
juanvilladev
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
In a query like the one below, if the templateEntryGroups array is empty, the whole query throws:
I understand in SQL, executing an 'in' query with an empty parenthesis throws so the implementation makes sense.
I propose we implement a safeInArray that won't throw similar to below:
Beta Was this translation helpful? Give feedback.
All reactions