(message: string)
| 62 | const instance = worker.current; |
| 63 | instance.onmessage = (event: MessageEvent<OrganicLayoutResponse>) => accept(event.data); |
| 64 | const stopWithError = (message: string) => { |
| 65 | instance.terminate(); |
| 66 | if (worker.current === instance) worker.current = undefined; |
| 67 | fail(message); |
| 68 | }; |
| 69 | instance.onerror = event => { |
| 70 | event.preventDefault(); |
| 71 | stopWithError(event.message || 'The graph layout worker failed.'); |
no test coverage detected