updateCanvas after import (#771)

* updateCanvas after import

* remove test causing a race condition with Cypress on CI

* fix indent
This commit is contained in:
JFH
2022-05-30 10:04:18 +02:00
committed by GitHub
parent d5c129ee78
commit 29103ddf86
2 changed files with 4 additions and 15 deletions

View File

@@ -134,7 +134,10 @@ class Editor extends EditorStartup {
*/
loadSvgString (str, { noAlert } = {}) {
const success = this.svgCanvas.setSvgString(str) !== false
if (success) return
if (success) {
this.updateCanvas()
return
}
if (!noAlert) seAlert(this.i18next.t('notification.errorLoadingSVG'))
throw new Error('Error loading SVG')
}