1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-08-13 18:53:59 +02:00

Fix typos in error messages (#5179)

This commit is contained in:
Oli
2022-11-08 12:37:34 +00:00
committed by GitHub
parent 469bec3d04
commit e61678da14

View File

@@ -29,14 +29,14 @@ export const Slate = (props: {
const [context, setContext] = React.useState<SlateContextValue>(() => { const [context, setContext] = React.useState<SlateContextValue>(() => {
if (!Node.isNodeList(value)) { if (!Node.isNodeList(value)) {
throw new Error( throw new Error(
`[Slate] value is invalid! Expected a list of elements` + `[Slate] value is invalid! Expected a list of elements but got: ${Scrubber.stringify(
`but got: ${Scrubber.stringify(value)}` value
)}`
) )
} }
if (!Editor.isEditor(editor)) { if (!Editor.isEditor(editor)) {
throw new Error( throw new Error(
`[Slate] editor is invalid! you passed:` + `[Slate] editor is invalid! You passed: ${Scrubber.stringify(editor)}`
`${Scrubber.stringify(editor)}`
) )
} }
editor.children = value editor.children = value