Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Fix dependency error when value is 0 (#93)
Browse files Browse the repository at this point in the history
  • Loading branch information
michalsidzej authored Nov 2, 2023
1 parent 573e8ff commit 7fa5e3c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions packages/discovery/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @l2beat/discovery

## 0.21.3

### Patch Changes

- Fix dependency error when value is 0

## 0.21.2

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/discovery/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@l2beat/discovery",
"description": "L2Beat discovery - engine & tooling utilized for keeping an eye on L2s",
"version": "0.21.2",
"version": "0.21.3",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"bin": {
Expand Down
2 changes: 1 addition & 1 deletion packages/discovery/src/discovery/handlers/reference.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export function resolveReference<T extends string | unknown>(
if (result.error) {
throw new Error(`Dependency error: ${result.error}`)
}
if (!result.value) {
if (result.value === undefined) {
throw new Error(`Dependency error: missing value`)
}
return result.value
Expand Down

0 comments on commit 7fa5e3c

Please sign in to comment.