1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-08-28 17:39:57 +02:00

Fixed a bug in the example code in docs (#4973)

This commit is contained in:
wojtek-kowalczyk
2022-04-26 18:10:00 +02:00
committed by GitHub
parent d40507d77e
commit 731fdf3457

View File

@@ -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.' }],