From 31cc99b1f1ee87e7b27490b0166ba47ea33900ce Mon Sep 17 00:00:00 2001 From: zazula Date: Thu, 21 Dec 2023 15:41:57 -0800 Subject: [PATCH] Update sprintf.js Don't display - for NaN --- src/sprintf.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sprintf.js b/src/sprintf.js index 65d6324..03017dd 100644 --- a/src/sprintf.js +++ b/src/sprintf.js @@ -63,7 +63,7 @@ } if (re.number.test(ph.type)) { - is_positive = arg >= 0 + is_positive = arg >= 0 || isNaN(arg) } switch (ph.type) {