From 7c4206a4e2922a26e092c099b50f5b8c2ab0b72e Mon Sep 17 00:00:00 2001 From: Bobby Date: Tue, 28 Jun 2022 13:36:17 +0700 Subject: [PATCH] fix: src/js/file.js --- src/js/file.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/file.js b/src/js/file.js index 5196a3a..17547ce 100644 --- a/src/js/file.js +++ b/src/js/file.js @@ -171,7 +171,7 @@ page.loadFileinfo = () => { img.setAttribute('alt', page.file.name || '') img.src = `${page.uploadRoot}/${page.file.name}` img.parentNode.classList.remove('is-hidden') - img.onerror = event => event.currentTarget.classList.add('is-hidden') + img.onerror = event => event.currentTarget.parentNode.classList.add('is-hidden') const isvideo = page.file.type.startsWith('video/') const isaudio = page.file.type.startsWith('audio/')