fix TS errors

This commit is contained in:
Sidharth Vinod 2023-02-22 02:15:15 +05:30
parent a59904cf16
commit c8e351c2bb
No known key found for this signature in database
GPG Key ID: FB5CCD378D3907CD

View File

@ -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');