Compare commits

...

3 Commits

Author SHA1 Message Date
semantic-release-bot adf01350dd chore(release): 0.1.0-develop.63 [skip ci]
# [0.1.0-develop.63](https://git.lumeweb.com/LumeWeb/libs5/compare/v0.1.0-develop.62...v0.1.0-develop.63) (2023-11-18)

### Bug Fixes

* wrap db.get in a try/catch ([b578a32](b578a32a44))
2023-11-18 09:00:45 +00:00
Derrick Hammer 0dbe18c75b
Merge remote-tracking branch 'origin/develop' into develop 2023-11-18 04:00:04 -05:00
Derrick Hammer b578a32a44
fix: wrap db.get in a try/catch 2023-11-18 04:00:00 -05:00
4 changed files with 16 additions and 4 deletions

View File

@ -1,3 +1,10 @@
# [0.1.0-develop.63](https://git.lumeweb.com/LumeWeb/libs5/compare/v0.1.0-develop.62...v0.1.0-develop.63) (2023-11-18)
### Bug Fixes
* wrap db.get in a try/catch ([b578a32](https://git.lumeweb.com/LumeWeb/libs5/commit/b578a32a4460c0f26e3d027df038936b4ca818a4))
# [0.1.0-develop.62](https://git.lumeweb.com/LumeWeb/libs5/compare/v0.1.0-develop.61...v0.1.0-develop.62) (2023-11-17) # [0.1.0-develop.62](https://git.lumeweb.com/LumeWeb/libs5/compare/v0.1.0-develop.61...v0.1.0-develop.62) (2023-11-17)

4
npm-shrinkwrap.json generated
View File

@ -1,12 +1,12 @@
{ {
"name": "@lumeweb/libs5", "name": "@lumeweb/libs5",
"version": "0.1.0-develop.62", "version": "0.1.0-develop.63",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "@lumeweb/libs5", "name": "@lumeweb/libs5",
"version": "0.1.0-develop.62", "version": "0.1.0-develop.63",
"dependencies": { "dependencies": {
"@noble/curves": "^1.1.0", "@noble/curves": "^1.1.0",
"@noble/hashes": "^1.3.1", "@noble/hashes": "^1.3.1",

View File

@ -1,6 +1,6 @@
{ {
"name": "@lumeweb/libs5", "name": "@lumeweb/libs5",
"version": "0.1.0-develop.62", "version": "0.1.0-develop.63",
"type": "module", "type": "module",
"main": "lib/index.js", "main": "lib/index.js",
"repository": { "repository": {

View File

@ -137,7 +137,12 @@ export class S5Node {
hash: Multihash, hash: Multihash,
): Promise<Map<number, Map<NodeId, Map<number, any>>>> { ): Promise<Map<number, Map<NodeId, Map<number, any>>>> {
const map = new Map<number, Map<NodeId, Map<number, any>>>(); const map = new Map<number, Map<NodeId, Map<number, any>>>();
const bytes = await this.db.get(stringifyHash(hash)); let bytes;
try {
bytes = await this.db.get(stringifyHash(hash));
} catch {
return map;
}
if (bytes === null) { if (bytes === null) {
return map; return map;
} }