| } | } | ||||
| export function textToEditorState(text: string) { | export function textToEditorState(text: string) { | ||||
| const paragraph = text ? text.split('\n') : [''] | |||||
| const paragraph = text && (typeof text === 'string') ? text.split('\n') : [''] | |||||
| return JSON.stringify({ | return JSON.stringify({ | ||||
| root: { | root: { |