mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-22 15:56:16 -04:00
correct translation from node Buffer to byte array
This commit is contained in:
parent
b98cab7d62
commit
638093d40e
3 changed files with 7 additions and 5 deletions
|
@ -36,7 +36,6 @@ class Dish {
|
|||
* literal input
|
||||
*/
|
||||
constructor(dishOrInput=null, type = null) {
|
||||
|
||||
this.value = [];
|
||||
this.type = Dish.BYTE_ARRAY;
|
||||
|
||||
|
@ -46,7 +45,7 @@ class Dish {
|
|||
dishOrInput.hasOwnProperty("type")) {
|
||||
this.set(dishOrInput.value, dishOrInput.type);
|
||||
// input and type defined separately
|
||||
} else if (dishOrInput && type) {
|
||||
} else if (dishOrInput && type !== null) {
|
||||
this.set(dishOrInput, type);
|
||||
// No type declared, so infer it.
|
||||
} else if (dishOrInput) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue