add option to disable gc (compatible with older versions)

This commit is contained in:
Kevin Jahns
2018-05-02 18:42:18 +02:00
parent bc32f7348e
commit bdb3782f8f
3 changed files with 5 additions and 4 deletions

View File

@@ -25,7 +25,7 @@ function _integrateRemoteStructHelper (y, struct) {
if (y.ss.getState(id.user) > id.clock) {
return
}
if (struct.constructor === GC || (struct._parent.constructor !== GC && struct._parent._deleted === false)) {
if (!y.gcEnabled || struct.constructor === GC || (struct._parent.constructor !== GC && struct._parent._deleted === false)) {
// Is either a GC or Item with an undeleted parent
// save to integrate
struct._integrate(y)