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

@@ -6,6 +6,7 @@ import {
splitItem,
changeItemRefOffset,
GC,
mergeItemWith,
Transaction, StructStore, Y, ID, AbstractType // eslint-disable-line
} from '../internals.js'
@@ -74,7 +75,7 @@ export class ItemJSON extends AbstractItem {
* @return {boolean}
*/
mergeWith (right) {
if (super.mergeWith(right)) {
if (mergeItemWith(this, right)) {
this.content = this.content.concat(right.content)
return true
}