mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-20 06:55:08 -04:00
File shim now translates correctly
This commit is contained in:
parent
d080c5dd14
commit
2019ae43d7
7 changed files with 14 additions and 28 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue