Skip to content

Commit

Permalink
refactor: remove unneeded assertion
Browse files Browse the repository at this point in the history
felixfbecker committed Apr 11, 2021
1 parent 5134b28 commit 7895cc6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
@@ -13,7 +13,7 @@ export function documentToSVG(document: Document, options?: DomToSvgOptions): XM
}

export function elementToSVG(element: Element, options?: DomToSvgOptions): XMLDocument {
const svgDocument = element.ownerDocument.implementation.createDocument(svgNamespace, 'svg', null) as XMLDocument
const svgDocument = element.ownerDocument.implementation.createDocument(svgNamespace, 'svg', null)

const svgElement = (svgDocument.documentElement as unknown) as SVGSVGElement
svgElement.setAttribute('xmlns', svgNamespace)

0 comments on commit 7895cc6

Please sign in to comment.