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

@@ -28,8 +28,9 @@ export { default as DomBinding } from './Bindings/DomBinding/DomBinding.js'
* @param {AbstractPersistence} persistence Persistence adapter instance
*/
export default class Y extends NamedEventHandler {
constructor (room, opts, persistence) {
constructor (room, opts, persistence, conf = {}) {
super()
this.gcEnabled = conf.gc || false
/**
* The room name that this Yjs instance connects to.
* @type {String}