From 48e65ddc3285248bee5461bff66435eb9f427613 Mon Sep 17 00:00:00 2001 From: Petyo Ivanov Date: Fri, 17 Nov 2023 11:54:00 +0200 Subject: [PATCH] fix: ui for invalid image is still usable Fixes #179 --- src/plugins/image/ImageEditor.tsx | 2 +- src/styles/lexical-theme.module.css | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/plugins/image/ImageEditor.tsx b/src/plugins/image/ImageEditor.tsx index e8e4deeb..f2d37a67 100644 --- a/src/plugins/image/ImageEditor.tsx +++ b/src/plugins/image/ImageEditor.tsx @@ -42,7 +42,7 @@ function useSuspenseImage(src: string) { throw new Promise((resolve) => { const img = new Image() img.src = src - img.onload = () => { + img.onerror = img.onload = () => { imageCache.add(src) resolve(null) } diff --git a/src/styles/lexical-theme.module.css b/src/styles/lexical-theme.module.css index 0362828a..db6fed53 100644 --- a/src/styles/lexical-theme.module.css +++ b/src/styles/lexical-theme.module.css @@ -57,7 +57,13 @@ } .nestedListItem { - list-style:none; + list-style: none; + list-style-type: none; +} + +.nestedListItem:before, +.nestedListItem:after { + display: none; } .listitem {