Skip to content

Commit

Permalink
minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
radex committed Jan 22, 2020
1 parent be19591 commit 02a7b3b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
10 changes: 4 additions & 6 deletions src/adapters/lokijs/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 1 addition & 2 deletions src/adapters/sqlite/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 02a7b3b

Please sign in to comment.