fix: ssr bug in markdown editor
This commit is contained in:
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
|
||||
|
||||
Reference in new issue
Block a user