From 463b06f5088032fa79b78b4a19b928d18012f518 Mon Sep 17 00:00:00 2001 From: n1474335 Date: Tue, 2 May 2017 22:53:57 +0100 Subject: [PATCH] Consistency modifications --- src/core/Dish.js | 4 ++-- src/core/Ingredient.js | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/core/Dish.js b/src/core/Dish.js index 7eaa563d..914188c1 100755 --- a/src/core/Dish.js +++ b/src/core/Dish.js @@ -11,10 +11,10 @@ import Utils from "./Utils.js"; * @param {byteArray|string|number} value - The value of the input data. * @param {number} type - The data type of value, see Dish enums. */ -function Dish(value, type) { +const Dish = function(value, type) { this.value = value || typeof value == "string" ? value : null; this.type = type || Dish.BYTE_ARRAY; -} +}; /** diff --git a/src/core/Ingredient.js b/src/core/Ingredient.js index f9e53caa..543f732b 100755 --- a/src/core/Ingredient.js +++ b/src/core/Ingredient.js @@ -64,6 +64,7 @@ Ingredient.prototype.setValue = function(value) { */ Ingredient.prepare = function(data, type) { let number; + switch (type) { case "binaryString": case "binaryShortString":