Skip to content

Commit

Permalink
fix(utils): allow empty string attribute to be set for nullable text
Browse files Browse the repository at this point in the history
  • Loading branch information
Ritchie Jacobs committed Aug 4, 2022
1 parent daaeee4 commit f543221
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,10 +169,10 @@ function setGroupedTimeout(fn, ttl) {
export
function getNullableText(...args) {
for (const arg of args) {
if (arg)
if (arg || arg === '')
return arg;

if (arg === false || arg === null || arg === '')
if (arg === false || arg === null)
return null;
}

Expand Down

0 comments on commit f543221

Please sign in to comment.