fix the "gc state" warning

This commit is contained in:
Kevin Jahns
2017-06-27 02:07:03 +02:00
parent 24facaab09
commit 409a9414f1
3 changed files with 26 additions and 13 deletions

View File

@@ -39,6 +39,7 @@ export default function extendDatabase (Y /* :any */) {
*/
constructor (y, opts) {
this.y = y
opts.gc = opts.gc === true
this.dbOpts = opts
var os = this
this.userId = null
@@ -121,7 +122,7 @@ export default function extendDatabase (Y /* :any */) {
this.startRepairCheck()
}
startGarbageCollector () {
this.gc = this.dbOpts.gc == null || this.dbOpts.gc
this.gc = this.dbOpts.gc
if (this.gc) {
this.gcTimeout = !this.dbOpts.gcTimeout ? 50000 : this.dbOpts.gcTimeout
} else {