mirror of
https://github.com/gchq/CyberChef
synced 2025-01-07 18:18:47 +00:00
pass full dish into NodeDish Apply to allow apply from ArrayBuffer type to work
This commit is contained in:
parent
656cf32753
commit
b98cab7d62
1 changed files with 2 additions and 2 deletions
|
@ -25,8 +25,8 @@ class NodeDish extends Dish {
|
||||||
// NOT Buffer.buff, as this makes a buffer of the whole object.
|
// NOT Buffer.buff, as this makes a buffer of the whole object.
|
||||||
if (Buffer.isBuffer(inputOrDish)) {
|
if (Buffer.isBuffer(inputOrDish)) {
|
||||||
inputOrDish = new Uint8Array(inputOrDish).buffer;
|
inputOrDish = new Uint8Array(inputOrDish).buffer;
|
||||||
|
type = Dish.BYTE_ARRAY;
|
||||||
}
|
}
|
||||||
|
|
||||||
super(inputOrDish, type);
|
super(inputOrDish, type);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -38,7 +38,7 @@ class NodeDish extends Dish {
|
||||||
* @returns {Dish} a new dish with the result of the operation.
|
* @returns {Dish} a new dish with the result of the operation.
|
||||||
*/
|
*/
|
||||||
apply(operation, args=null) {
|
apply(operation, args=null) {
|
||||||
return operation(this.value, args);
|
return operation(this, args);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue