Skip to content

Commit f0c619a

Browse files
committed
fix: tweaks
1 parent 3be4cf9 commit f0c619a

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed

src/index.js

+1-6
Original file line numberDiff line numberDiff line change
@@ -281,12 +281,11 @@ class IpfsRepo {
281281
autoMigrateConfig = await this.config.get(AUTO_MIGRATE_CONFIG_KEY)
282282
} catch (e) {
283283
if (e.code === ERRORS.NotFoundError.code) {
284-
autoMigrateConfig = true
284+
autoMigrateConfig = true // Config's default value is True
285285
} else {
286286
throw e
287287
}
288288
}
289-
log(`optin: ${this.options.autoMigrate}; config: ${autoMigrateConfig}`)
290289

291290
return autoMigrateConfig && this.options.autoMigrate
292291
}
@@ -298,10 +297,6 @@ class IpfsRepo {
298297
throw new ERRORS.InvalidRepoVersionError('Your repo\'s version is higher then this version of js-ipfs-repo require! You have to revert it.')
299298
}
300299

301-
if (currentRepoVersion === toVersion) {
302-
return
303-
}
304-
305300
log('migrating to version ' + toVersion)
306301
return migrator.migrate(this.path, { toVersion: toVersion, ignoreLock: true, repoOptions: this.options })
307302
}

test/browser.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,7 @@ async function createTempRepo ({ dontOpen, opts }) {
1717

1818
return {
1919
path: repoPath,
20-
instance: repo,
21-
teardown: async () => {
22-
}
20+
instance: repo
2321
}
2422
}
2523

0 commit comments

Comments
 (0)