mirror of
https://github.com/gchq/CyberChef
synced 2025-12-20 02:03:28 +00:00
Tests now work
Also they'll work in the node API too now
This commit is contained in:
@@ -34,10 +34,14 @@ class ToMessagePack extends Operation {
|
||||
*/
|
||||
run(input, args) {
|
||||
try {
|
||||
return notepack.encode(input);
|
||||
if (ENVIRONMENT_IS_WORKER()) {
|
||||
return notepack.encode(input);
|
||||
} else {
|
||||
return notepack.encode(input).buffer;
|
||||
}
|
||||
} catch (err) {
|
||||
throw new OperationError(`Could not encode JSON to MessagePack: ${err}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user