From f543221ca6c0845022e58300c0e44dd71933e379 Mon Sep 17 00:00:00 2001 From: Ritchie Jacobs Date: Thu, 4 Aug 2022 14:09:15 +0200 Subject: [PATCH] fix(utils): allow empty string attribute to be set for nullable text --- src/utils.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils.js b/src/utils.js index 47f08fe..d86a735 100644 --- a/src/utils.js +++ b/src/utils.js @@ -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; }