From 9617a15ae8b25804138a8dcdaf813855b02220be Mon Sep 17 00:00:00 2001 From: Tom Moor Date: Sat, 7 Jan 2023 15:26:06 -0500 Subject: [PATCH] fix: No value supplied for attribute src It shouldn't be possible to have an image node with no src, but it does happen occassionally and this prevents the document from persisting. It's better to have a broken image than a doc that won't save --- shared/editor/nodes/Image.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/shared/editor/nodes/Image.tsx b/shared/editor/nodes/Image.tsx index b8dde6fff..b837a74b1 100644 --- a/shared/editor/nodes/Image.tsx +++ b/shared/editor/nodes/Image.tsx @@ -168,7 +168,9 @@ export default class Image extends Node { return { inline: true, attrs: { - src: {}, + src: { + default: "", + }, width: { default: undefined, },