From ff2521aa9fc276225c7bd64ced3d199e87fcec24 Mon Sep 17 00:00:00 2001 From: d98762625 Date: Fri, 15 Feb 2019 16:26:22 +0000 Subject: [PATCH] WIP Dish now working on dev with dynamically loaded _translate and get functions --- src/core/Dish.mjs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/core/Dish.mjs b/src/core/Dish.mjs index 95d821d8..17a6d2a0 100755 --- a/src/core/Dish.mjs +++ b/src/core/Dish.mjs @@ -248,14 +248,6 @@ class Dish { */ constructor(dishOrInput=null, type = null) { - if (Utils.isBrowser()) { - this._translate = _asyncTranslate.bind(this); - this.get = asyncGet.bind(this); - } else { - this._translate = _translate.bind(this); - this.get = get.bind(this); - } - this.value = []; this.type = Dish.BYTE_ARRAY; @@ -561,4 +553,12 @@ Dish.FILE = 7; */ Dish.LIST_FILE = 8; +if (Utils.isBrowser()) { + Dish.prototype._translate = _asyncTranslate + Dish.prototype.get = asyncGet +} else { + Dish.prototype._translate = _translate + Dish.prototype.get = get +} + export default Dish;