fix ts errors

This commit is contained in:
Philipp Kühn
2020-09-21 23:44:35 +02:00
parent 4da71ecfbb
commit 78ff453030
6 changed files with 19 additions and 20 deletions

View File

@@ -13,11 +13,7 @@ declare module '../Editor' {
}
}
export const setContent: SetContentCommand = (content = null, emitUpdate = false, parseOptions = {}) => ({ tr, editor }) => {
if (content === null) {
return false
}
export const setContent: SetContentCommand = (content = '', emitUpdate = false, parseOptions = {}) => ({ tr, editor }) => {
const { createDocument } = editor
const { doc } = tr
const document = createDocument(content, parseOptions)