Skip to content

Commit

Permalink
fix: adding optional chanining as fail-safe
Browse files Browse the repository at this point in the history
  • Loading branch information
amit-y committed Aug 15, 2023
1 parent 5caea9d commit 1229f3e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/flow/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const Flow = ({

useEffect(() => {
const { nerdStorageWriteDocument: { document } = {} } =
flowWriter.data || {};
flowWriter?.data || {};
if (document) onUpdate(document);
}, [flowWriter.data]);

Expand Down

0 comments on commit 1229f3e

Please sign in to comment.