From: Ardis Lu Date: Sun, 28 Sep 2025 05:02:47 +0000 (-0700) Subject: Delete unnecessary ternary X-Git-Tag: v0.1.7~7 X-Git-Url: https://git.ardis.lu/?a=commitdiff_plain;h=83a54f78df8d333435fe62806526e3acdd7304e3;p=csvio Delete unnecessary ternary --- diff --git a/src/normalization.js b/src/normalization.js index 3d51af7..e9d7683 100644 --- a/src/normalization.js +++ b/src/normalization.js @@ -170,7 +170,7 @@ export class CSVNormalizer extends TransformStream { const out = []; for (const { name, type, displayName, defaultValue, index } of this.#columns) { let value = chunk[index] ?? ''; - const emptyField = value === '' ? true : false; + const emptyField = value === ''; switch (type) { case 'string': break; case 'number': value = this.#typeCastOnly ? Number(value) : CSVNormalizer.fixExcelNumber(value); break;