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:
@@ -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
|
||||||
|
Reference in New Issue
Block a user