From 974fed5649808508f467cdbfc203a90070ef727c Mon Sep 17 00:00:00 2001 From: Akiomi Kamakura Date: Sat, 30 Jan 2021 14:07:44 +0900 Subject: [PATCH] Change null result to empty --- src/custom-functions/bcode-result.test.ts | 4 ++-- src/custom-functions/bcode-result.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/custom-functions/bcode-result.test.ts b/src/custom-functions/bcode-result.test.ts index 122a6dc..95dcc49 100644 --- a/src/custom-functions/bcode-result.test.ts +++ b/src/custom-functions/bcode-result.test.ts @@ -34,6 +34,6 @@ test('format', () => { '430,602,000,000円' ) - expect(new BcodeResult(null, '百万円').format(true, false)).toBe('N/A') - expect(new BcodeResult(null, '百万円').format(true, true)).toBe('N/A') + expect(new BcodeResult(null, '百万円').format(true, false)).toBe('') + expect(new BcodeResult(null, '百万円').format(true, true)).toBe('') }) diff --git a/src/custom-functions/bcode-result.ts b/src/custom-functions/bcode-result.ts index 6192253..ad7ae35 100644 --- a/src/custom-functions/bcode-result.ts +++ b/src/custom-functions/bcode-result.ts @@ -7,7 +7,7 @@ export class BcodeResult { let value = this.value if (value === null) { - return 'N/A' + return '' } if (typeof value === 'number' && this.unit === '百万円') {