mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-01-14 06:43:25 +08:00
fix TS errors
This commit is contained in:
parent
a59904cf16
commit
c8e351c2bb
@ -1,4 +1,4 @@
|
|||||||
// @ts-expect-error - db not typed yet
|
// @ts-ignore - db not typed yet
|
||||||
import { select, Selection } from 'd3';
|
import { select, Selection } from 'd3';
|
||||||
import svgDraw from './svgDraw';
|
import svgDraw from './svgDraw';
|
||||||
import { log } from '../../logger';
|
import { log } from '../../logger';
|
||||||
@ -46,9 +46,11 @@ export const draw = function (text: string, id: string, version: string, diagObj
|
|||||||
}
|
}
|
||||||
const root =
|
const root =
|
||||||
securityLevel === 'sandbox'
|
securityLevel === 'sandbox'
|
||||||
? select(sandboxElement.nodes()[0].contentDocument.body)
|
? // @ts-ignore d3 types are wrong
|
||||||
|
select(sandboxElement.nodes()[0].contentDocument.body)
|
||||||
: select('body');
|
: select('body');
|
||||||
|
|
||||||
|
// @ts-ignore d3 types are wrong
|
||||||
const svg = root.select('#' + id);
|
const svg = root.select('#' + id);
|
||||||
|
|
||||||
svg.append('g');
|
svg.append('g');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user