d2js: fix browser worker elk check
This commit is contained in:
parent
1e36752194
commit
1417ded66a
1 changed files with 0 additions and 5 deletions
|
|
@ -38,11 +38,6 @@ export function setupMessageHandler(isNode, port, initWasm) {
|
||||||
const layout = await elk.layout(elkGraph2);
|
const layout = await elk.layout(elkGraph2);
|
||||||
globalThis.elkResult = layout;
|
globalThis.elkResult = layout;
|
||||||
}
|
}
|
||||||
const elkGraph = await d2.getELKGraph(JSON.stringify(data));
|
|
||||||
const elkGraph2 = JSON.parse(elkGraph).data;
|
|
||||||
const layout = await elk.layout(elkGraph2);
|
|
||||||
globalThis.elkResult = layout;
|
|
||||||
|
|
||||||
const result = await d2.compile(JSON.stringify(data));
|
const result = await d2.compile(JSON.stringify(data));
|
||||||
const response = JSON.parse(result);
|
const response = JSON.parse(result);
|
||||||
if (response.error) throw new Error(response.error.message);
|
if (response.error) throw new Error(response.error.message);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue