Update dependency markmap-lib to v0.9.2 (#707)

* Update dependency markmap-lib to v0.9.2

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
This commit is contained in:
renovate[bot] 2020-10-25 11:58:40 +01:00 committed by GitHub
parent 3b50a00021
commit 47f84f1933
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 9 additions and 15 deletions

View file

@ -45,17 +45,20 @@ export const MarkmapFrame: React.FC<MarkmapFrameProps> = ({ code }) => {
svg.setAttribute('width', '100%')
actualContainer.querySelectorAll('svg').forEach(child => child.remove())
actualContainer.appendChild(svg)
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-call
const { root, features } = transform.transform(code)
// eslint-disable-next-line @typescript-eslint/no-unsafe-call,@typescript-eslint/no-unsafe-assignment
const { styles, scripts } = transform.getUsedAssets(features)
if (styles) {
// eslint-disable-next-line @typescript-eslint/no-unsafe-call
loader.loadCSS(styles)
}
if (scripts) {
// eslint-disable-next-line @typescript-eslint/no-unsafe-call,@typescript-eslint/no-unsafe-return,@typescript-eslint/no-unsafe-member-access
loader.loadJS(scripts, { getMarkmap: () => view.Markmap })
.catch(err => console.error(err))
}
// eslint-disable-next-line @typescript-eslint/no-unsafe-call,@typescript-eslint/no-unsafe-member-access
view.Markmap.create(svg, {}, root)
}).catch(() => { console.error('error while loading markmap') })
}, [code])