From: Justin Wind Date: Mon, 16 Aug 2021 18:42:50 +0000 (-0700) Subject: fix db schema version check X-Git-Tag: v1.1.4^2~3 X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=b7fa490d270db56935d2f1b380351aa264295119;p=websub-hub fix db schema version check --- diff --git a/src/db/base.js b/src/db/base.js index 21e2664..95c9010 100644 --- a/src/db/base.js +++ b/src/db/base.js @@ -96,7 +96,7 @@ class Database { const current = svh.schemaVersionObjectToNumber(currentSchema); const min = svh.schemaVersionObjectToNumber(this.schemaVersionsSupported.min); const max = svh.schemaVersionObjectToNumber(this.schemaVersionsSupported.max); - if (min >= current && max <= current) { + if (current >= min && current <= max) { this.logger.debug(_scope, 'schema supported', { currentSchema, schemaVersionsSupported: this.schemaVersionsSupported }); } else { this.logger.error(_scope, 'schema not supported', { currentSchema, schemaVersionsSupported: this.schemaVersionsSupported });