From 731fdf3457a50f6172743e981fb7f04cba630f19 Mon Sep 17 00:00:00 2001 From: wojtek-kowalczyk <87316202+wojtek-kowalczyk@users.noreply.github.com> Date: Tue, 26 Apr 2022 18:10:00 +0200 Subject: [PATCH] Fixed a bug in the example code in docs (#4973) --- docs/walkthroughs/06-saving-to-a-database.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/walkthroughs/06-saving-to-a-database.md b/docs/walkthroughs/06-saving-to-a-database.md index 03a255c5e..cd3b64e3e 100644 --- a/docs/walkthroughs/06-saving-to-a-database.md +++ b/docs/walkthroughs/06-saving-to-a-database.md @@ -72,7 +72,7 @@ const App = () => { const editor = useMemo(() => withReact(createEditor()), []) // Update the initial content to be pulled from Local Storage if it exists. const initialValue = useMemo( - JSON.parse(localStorage.getItem('content')) || [ + () => JSON.parse(localStorage.getItem('content')) || [ { type: 'paragraph', children: [{ text: 'A line of text in a paragraph.' }],