WIP Dish now working on dev with dynamically loaded _translate and get functions

This commit is contained in:
d98762625 2019-02-15 16:26:22 +00:00
parent 9094e8bde9
commit ff2521aa9f
1 changed files with 8 additions and 8 deletions

View File

@ -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;