Browse Source

change empty Dish initialisation to use ArrayBuffer

d98762625 6 years ago
parent
commit
cdc15c0f20
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/core/Dish.mjs

+ 2 - 2
src/core/Dish.mjs

@@ -21,8 +21,8 @@ class Dish {
      * @param {Dish} [dish=null] - A dish to clone
      * @param {Dish} [dish=null] - A dish to clone
      */
      */
     constructor(dish=null) {
     constructor(dish=null) {
-        this.value = [];
-        this.type = Dish.BYTE_ARRAY;
+        this.value = new ArrayBuffer(0);
+        this.type = Dish.ARRAY_BUFFER;
 
 
         if (dish &&
         if (dish &&
             dish.hasOwnProperty("value") &&
             dish.hasOwnProperty("value") &&