diff --git a/src/OrbitDB.js b/src/OrbitDB.js index e965c5c..6011350 100644 --- a/src/OrbitDB.js +++ b/src/OrbitDB.js @@ -433,8 +433,9 @@ class OrbitDB { logger.debug(`Manifest for '${dbAddress}':\n${JSON.stringify(manifest, null, 2)}`) // Make sure the type from the manifest matches the type that was given as an option + if (manifest.name !== dbAddress.path) { throw new Error(`Manifest '${manifest.name}' cannot be opened as '${dbAddress.path}'`) } if (options.type && manifest.type !== options.type) { throw new Error(`Database '${dbAddress}' is type '${manifest.type}' but was opened as '${options.type}'`) } - + // Save the database locally await this._addManifestToCache(options.cache, dbAddress)