2
0
mirror of https://github.com/gchq/CyberChef synced 2025-12-14 23:33:25 +00:00

File shim now translates correctly

This commit is contained in:
d98762625
2019-03-14 16:33:09 +00:00
parent d080c5dd14
commit 2019ae43d7
7 changed files with 14 additions and 28 deletions

View File

@@ -336,13 +336,11 @@ class Dish {
// Node environment => translate is sync
if (Utils.isNode()) {
console.log('Running in node');
this._toByteArray();
this._fromByteArray(toType, notUTF8);
// Browser environment => translate is async
} else {
console.log('Running in browser');
return new Promise((resolve, reject) => {
this._toByteArray()
.then(() => this.type = Dish.BYTE_ARRAY)