fix relativePosition if startof is a root type

This commit is contained in:
Kevin Jahns
2017-11-07 20:10:01 -08:00
parent b7c05ba133
commit dbdd49af23
2 changed files with 17 additions and 4 deletions

View File

@@ -36,7 +36,13 @@ export default class YMap extends Type {
return map
}
keys () {
return Array.from(this._map.keys()).filter(x => !x._deleted)
let keys = []
for (let [key, value] of this._map) {
if (!value._deleted) {
keys.push(key)
}
}
return keys
}
delete (key) {
this._transact((y) => {