add image fallback

pull/2/head
Septs 2022-12-03 00:33:34 +08:00
parent f837dc5856
commit 527486f866
No known key found for this signature in database
GPG Key ID: 65144037AFA516E1
1 changed files with 1 additions and 1 deletions

View File

@ -106,7 +106,7 @@ function onAbbreviation() {
}
function onImageFallback() {
on(document, 'error', 'img', onError, { capture: true })
document.addEventListener('error', onError, { capture: true })
function onError(event: Event) {
if (event.target === null) return