mirror of
https://github.com/gchq/CyberChef.git
synced 2024-11-02 14:11:02 +01:00
If sending arraybuffer back, use a transferable object
This commit is contained in:
parent
7b169fb798
commit
f638bd4ded
@ -101,14 +101,23 @@ async function bake(data) {
|
||||
data.progress, // The current position in the recipe
|
||||
data.step // Whether or not to take one step or execute the whole recipe
|
||||
);
|
||||
|
||||
self.postMessage({
|
||||
action: "bakeComplete",
|
||||
data: Object.assign(response, {
|
||||
id: data.id,
|
||||
inputNum: data.inputNum
|
||||
})
|
||||
});
|
||||
if (typeof response.result === "string") {
|
||||
self.postMessage({
|
||||
action: "bakeComplete",
|
||||
data: Object.assign(response, {
|
||||
id: data.id,
|
||||
inputNum: data.inputNum
|
||||
})
|
||||
});
|
||||
} else {
|
||||
self.postMessage({
|
||||
action: "bakeComplete",
|
||||
data: Object.assign(response, {
|
||||
id: data.id,
|
||||
inputNum: data.inputNum
|
||||
})
|
||||
}, [response.result]);
|
||||
}
|
||||
} catch (err) {
|
||||
self.postMessage({
|
||||
action: "bakeError",
|
||||
|
Loading…
Reference in New Issue
Block a user