AbstractItem.mergeWith helper outsourced into separate function

This commit is contained in:
Kevin Jahns
2019-04-24 18:10:33 +02:00
parent 45237571b7
commit 1d0f9faa91
8 changed files with 62 additions and 57 deletions

View File

@@ -241,6 +241,10 @@ export const createAbsolutePositionFromCursor = (cursor, y) => {
if (tname !== null) {
type = y.get(tname)
} else if (typeID !== null) {
if (getState(store, typeID.client) <= typeID.clock) {
// type does not exist yet
return null
}
const struct = getItemType(store, typeID)
if (struct instanceof ItemType) {
type = struct.type