Skip to content
This repository has been archived by the owner on Jan 1, 2025. It is now read-only.

Commit

Permalink
fix: Allow creating 2 instances of levelDB database by specifying dif…
Browse files Browse the repository at this point in the history
…ferent Level internals, rather han using dbPath, or even combined.

Signed-off-by: Francisco Javier Ribó Labrador <[email protected]>
  • Loading branch information
elribonazo committed Dec 19, 2023
1 parent 6d04a91 commit 65a6b34
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/leveldb/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ function getRxStorageLevel<RxDocType>(settings: LevelDBSettings): RxStorageLevel
};

const databasePath = "level" in levelDBConstructorProps ?
levelDBConstructorProps.level.path :
levelDBConstructorProps.level.db.location :
levelDBConstructorProps.dbPath;

const existingInstance = internalInstance.get(databasePath);
Expand Down

0 comments on commit 65a6b34

Please sign in to comment.