From 02a7b3b8a1d3ce1706e9097f9438b314af5ad19a Mon Sep 17 00:00:00 2001 From: radex Date: Wed, 22 Jan 2020 13:55:00 +0100 Subject: [PATCH] minor changes --- src/adapters/lokijs/index.js | 10 ++++------ src/adapters/sqlite/index.js | 3 +-- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/src/adapters/lokijs/index.js b/src/adapters/lokijs/index.js index 5cc15d1b6..94c9bf3d3 100644 --- a/src/adapters/lokijs/index.js +++ b/src/adapters/lokijs/index.js @@ -68,24 +68,22 @@ export default class LokiJSAdapter implements DatabaseAdapter { this._dbName = dbName if (process.env.NODE_ENV !== 'production') { - if (options.useWebWorker === undefined) { + if (!('useWebWorker' in options)) { logger.warn( 'LokiJSAdapter `useWebWorker` option will become required in a future version of WatermelonDB. Pass `{ useWebWorker: false }` to adopt the new behavior, or `{ useWebWorker: true }` to supress this warning with no changes', ) } - if (options.useIncrementalIndexedDB === undefined) { + if (!('useIncrementalIndexedDB' in options)) { logger.warn( 'LokiJSAdapter `useIncrementalIndexedDB` option will become required in a future version of WatermelonDB. Pass `{ useIncrementalIndexedDB: true }` to adopt the new behavior, or `{ useIncrementalIndexedDB: false }` to supress this warning with no changes', ) } invariant( - // $FlowFixMe - options.migrationsExperimental === undefined, + !('migrationsExperimental' in options), 'LokiJSAdapter `migrationsExperimental` option has been renamed to `migrations`', ) invariant( - // $FlowFixMe - options.experimentalUseIncrementalIndexedDB === undefined, + !('experimentalUseIncrementalIndexedDB' in options), 'LokiJSAdapter `experimentalUseIncrementalIndexedDB` option has been renamed to `useIncrementalIndexedDB`', ) validateAdapter(this) diff --git a/src/adapters/sqlite/index.js b/src/adapters/sqlite/index.js index ea137a6a9..89fc06880 100644 --- a/src/adapters/sqlite/index.js +++ b/src/adapters/sqlite/index.js @@ -219,8 +219,7 @@ export default class SQLiteAdapter implements DatabaseAdapter, SQLDatabaseAdapte if (process.env.NODE_ENV !== 'production') { invariant( - // $FlowFixMe - options.migrationsExperimental === undefined, + !('migrationsExperimental' in options), 'SQLiteAdapter `migrationsExperimental` option has been renamed to `migrations`', ) invariant(