update types

This commit is contained in:
Philipp Kühn
2020-11-11 14:00:56 +01:00
parent 1243e4cd50
commit 7ad611378b
3 changed files with 74 additions and 62 deletions

View File

@@ -6,8 +6,10 @@ import { Command } from '../Editor'
function defaultBlockAt(match: ContentMatch) {
for (let i = 0; i < match.edgeCount; i + 1) {
const { type } = match.edge(i)
// @ts-ignore
if (type.isTextblock && !type.hasRequiredAttrs()) return type
if (type.isTextblock && !type.hasRequiredAttrs()) {
return type
}
}
return null
}