Skip to content

Commit

Permalink
fix: improve the check condition
Browse files Browse the repository at this point in the history
  • Loading branch information
Palanikannan1437 committed Jan 15, 2025
1 parent 5a78b54 commit 88c7424
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/editor/src/core/hooks/use-editor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ export const useEditor = (props: CustomEditorProps) => {
useEffect(() => {
// value is null when intentionally passed where syncing is not yet
// supported and value is undefined when the data from swr is not populated
if (value === null || value === undefined) return;
if (value == null) return;
if (editor && !editor.isDestroyed && !editor.storage.imageComponent.uploadInProgress) {
try {
editor.commands.setContent(value, false, { preserveWhitespace: "full" });
Expand Down

0 comments on commit 88c7424

Please sign in to comment.