From 94e00115fe3b98f1257ca3f5fdafa37146e4fba7 Mon Sep 17 00:00:00 2001 From: 71819 Date: Sat, 28 Mar 2020 20:27:59 +0000 Subject: [PATCH] Issue 998: DishJSON should only replace undefined with new ArrayBuffer not null or false --- src/core/dishTypes/DishJSON.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/dishTypes/DishJSON.mjs b/src/core/dishTypes/DishJSON.mjs index 210f32d8..703b0980 100644 --- a/src/core/dishTypes/DishJSON.mjs +++ b/src/core/dishTypes/DishJSON.mjs @@ -17,7 +17,7 @@ class DishJSON extends DishType { */ static toArrayBuffer() { DishJSON.checkForValue(this.value); - this.value = this.value ? Utils.strToArrayBuffer(JSON.stringify(this.value, null, 4)) : new ArrayBuffer; + this.value = this.value !== undefined ? Utils.strToArrayBuffer(JSON.stringify(this.value, null, 4)) : new ArrayBuffer; } /**