fix: ssr bug in markdown editor

This commit is contained in:
Xylight committed 2024-06-05 11:36:56 -07:00
1 parent d0fe030b32
commit c5aa151070
1 file changed
+5 -6
@@ -64,12 +64,11 @@
let uploadingImage = false
let loading = false
let image: any
$: previewURL =
image instanceof FileList
? URL.createObjectURL(image[0])
: image
? URL.createObjectURL(image)
: ''
$: previewURL = image?.length
? URL.createObjectURL(image[0])
: image
? URL.createObjectURL(image)
: ''
async function upload() {
if (!$profile?.jwt || !image) return