Skip to content
This repository was archived by the owner on Oct 1, 2021. It is now read-only.

Commit 813f2aa

Browse files
committed
style: lint
1 parent c93c732 commit 813f2aa

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

src/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ async function migrate (path, { toVersion, ignoreLock = false, repoOptions, onPr
9999
if (!isDryRun) await migration.migrate(path, repoOptions, isBrowser)
100100
} catch (e) {
101101
const lastSuccessfullyMigratedVersion = migration.version - 1
102-
log(`An exception was raised during execution of migration. Setting the repo\'s version to last successfully migrated version: ${lastSuccessfullyMigratedVersion}`)
102+
log(`An exception was raised during execution of migration. Setting the repo's version to last successfully migrated version: ${lastSuccessfullyMigratedVersion}`)
103103
await repoVersion.setVersion(path, lastSuccessfullyMigratedVersion)
104104

105105
e.message = `During migration to version ${migration.version} exception was raised: ${e.message}`
@@ -193,7 +193,7 @@ async function revert (path, toVersion, { ignoreLock = false, repoOptions, onPro
193193
if (!isDryRun) await migration.revert(path, repoOptions, isBrowser)
194194
} catch (e) {
195195
const lastSuccessfullyRevertedVersion = migration.version
196-
log(`An exception was raised during execution of migration. Setting the repo\'s version to last successfully reverted version: ${lastSuccessfullyRevertedVersion}`)
196+
log(`An exception was raised during execution of migration. Setting the repo's version to last successfully reverted version: ${lastSuccessfullyRevertedVersion}`)
197197
await repoVersion.setVersion(path, lastSuccessfullyRevertedVersion)
198198

199199
e.message = `During reversion to version ${migration.version} exception was raised: ${e.message}`

src/utils.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,22 @@
22

33
const Datastore = require('datastore-fs')
44

5-
exports.getDatastoreAndOptions = function getDatastoreAndOptions(options, key, defaultDatastore = Datastore) {
5+
exports.getDatastoreAndOptions = function getDatastoreAndOptions (options, key, defaultDatastore = Datastore) {
66
let StorageBackend, storageBackendOptions
7-
if (options !== undefined
8-
&& options['storageBackends'] !== undefined
9-
&& options['storageBackends'][key] !== undefined
7+
if (options !== undefined &&
8+
options.storageBackends !== undefined &&
9+
options.storageBackends[key] !== undefined
1010
) {
11-
StorageBackend = options['storageBackends'][key]
11+
StorageBackend = options.storageBackends[key]
1212
} else {
1313
StorageBackend = defaultDatastore
1414
}
1515

16-
if (options !== undefined
17-
&& options['storageBackendOptions'] !== undefined
18-
&& options['storageBackendOptions'][key] !== undefined
16+
if (options !== undefined &&
17+
options.storageBackendOptions !== undefined &&
18+
options.storageBackendOptions[key] !== undefined
1919
) {
20-
storageBackendOptions = options['storageBackendOptions'][key]
20+
storageBackendOptions = options.storageBackendOptions[key]
2121
} else {
2222
storageBackendOptions = {}
2323
}

0 commit comments

Comments
 (0)