Fix image export bug on multiplayer mode (#1130)

This commit is contained in:
Kevin Park 2023-02-03 01:06:09 +09:00 committed by GitHub
parent 55a8831a6b
commit e2a13d5992
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1141,6 +1141,7 @@ export class TLDR {
const width = +svg.getAttribute('width')!
const height = +svg.getAttribute('height')!
const svgSrc = svg.lastElementChild!.getAttribute('xlink:href')!
if (!svgString) return
@ -1171,7 +1172,7 @@ export class TLDR {
console.warn('Could not convert that SVG to an image.')
}
image.src = dataUrl
image.src = svgSrc.includes('data:') ? dataUrl : svgSrc
})
const blob = await new Promise<Blob>((resolve) =>