mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
parent
5de4f1c58f
commit
517b6dd631
1 changed files with 8 additions and 6 deletions
|
@ -37,12 +37,14 @@ export function getWorker() {
|
|||
if (type === 'run') {
|
||||
const { threadId } = msg;
|
||||
const { ast, context } = value;
|
||||
heap[threadId]
|
||||
.onFunctionNotFound(ast, context)
|
||||
.then(value => {
|
||||
worker.send({ type: 'msgSuccess', id, value: value });
|
||||
})
|
||||
.catch(e => heap[threadId].reject(e));
|
||||
if (heap[threadId]) {
|
||||
heap[threadId]
|
||||
.onFunctionNotFound(ast, context)
|
||||
.then(value => {
|
||||
worker.send({ type: 'msgSuccess', id, value: value });
|
||||
})
|
||||
.catch(e => heap[threadId].reject(e));
|
||||
}
|
||||
}
|
||||
|
||||
if (type === 'msgSuccess' && heap[id]) heap[id].resolve(value);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue