Skip to content

Commit eb602b1

Browse files
committed
chore: WYSIWYG editor when empty do not save an empty <p> element to DB
no-ticket
1 parent 5652030 commit eb602b1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/components/IPRWYSIWYGEditor/index.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ const IPRWYSIWYGEditor = ({
186186

187187
const handleOnSave = useCallback(() => {
188188
if (editor) {
189-
onClose(editor.getHTML());
189+
onClose(editor.isEmpty ? '' : editor.getHTML());
190190
}
191191
}, [editor, onClose]);
192192

0 commit comments

Comments
 (0)