From 1fedfaa129fc498e3ef7d94ecdeeec65523c03d9 Mon Sep 17 00:00:00 2001 From: Federico Pinna Date: Tue, 5 Jul 2022 09:40:23 +0200 Subject: [PATCH] fix: handle falsy values in csv export --- src/util.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util.ts b/src/util.ts index 155e5ec..14de994 100644 --- a/src/util.ts +++ b/src/util.ts @@ -394,7 +394,7 @@ export function toCSV(data: any[], options: CSVOptions): string { : value.toISOString() ); } else { - l.push((value || '').toString()); + l.push((typeof value !== 'undefined' ? value : '').toString()); } } out.push(l);