I had a bug that turned out to be because I forgot to check for null values. I added the check, but would like if it could be written more concise.
<ListItem onClick={!pattern.capped && !pattern.hasInlineRef ? search(pattern.dbValue, pattern.dbValue === "" || pattern.dbValue === null) : undefined}>
Can this check for empty or null be shortened?
search(pattern.dbValue, pattern.dbValue === "" || pattern.dbValue === null)
It's written in Typescript, but I guess the curly braces make it JavaScript.
dbValueproperty first, I think. If its only falsey values are the empty string and null, just callBooleanon it in the second argumentundefinedcheck