-
Notifications
You must be signed in to change notification settings - Fork 499
Labels
kind/bugA bug in existing code (including security flaws)A bug in existing code (including security flaws)
Description
- Version:
0.45.0
Severity:
Low
Description:
Creating a libp2p instance with services that are undefined creates a null pointer exception even if it is allowed by the types
createLibp2p({
...,
services: {
abc: undefined
}
})
To mitigate this I think there needs to be a null check before this
Line 167 in 710da91
const service: any = createService(this.components) |
to check if
createService
is a function.
I ended up with this error because I am generating different configs based on conditions, and this leads me to assign "undefined" to services relay
occasionally
Metadata
Metadata
Assignees
Labels
kind/bugA bug in existing code (including security flaws)A bug in existing code (including security flaws)