Skip to content
This repository has been archived by the owner on Oct 3, 2023. It is now read-only.

fix: build #113

Merged
merged 3 commits into from
Apr 13, 2021
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ jobs:
- run: npm install
- run: npx aegir lint
- run: npx aegir dep-check
- run: npx aegir build
test-node:
needs: check
runs-on: ${{ matrix.os }}
Expand Down Expand Up @@ -44,4 +45,4 @@ jobs:
steps:
- uses: actions/checkout@v2
- run: npm install
- run: npx aegir test -t browser -t webworker --bail -- --browsers FirefoxHeadless
- run: npx aegir test -t browser -t webworker --bail -- --browser firefox
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"main": "src/index.js",
"scripts": {
"lint": "aegir lint",
"build": "aegir build",
"test": "aegir test",
"test:node": "aegir test -t node",
"test:browser": "aegir test -t browser",
Expand Down
8 changes: 7 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,14 @@ class Bootstrap extends EventEmitter {
}

const ma = new Multiaddr(candidate)
const peerIdStr = ma.getPeerId()

const peerId = PeerId.createFromB58String(ma.getPeerId())
if (!peerIdStr) {
log.error('Invalid bootstrap multiaddr without peer id')
return
}

const peerId = PeerId.createFromB58String(peerIdStr)

try {
this.emit('peer', {
Expand Down