mirror of
https://github.com/ipfs/kubo.git
synced 2026-03-12 11:48:07 +08:00
do not provide if nil router
This commit is contained in:
parent
91c4b28d04
commit
e0a0559e52
@ -588,5 +588,8 @@ func humanFull(val float64, decimals int) string {
|
||||
// optimistic provide call.
|
||||
// - Else we make a standard provide call (much slower).
|
||||
func provideRoot(ctx context.Context, router routing.Routing, c cid.Cid) error {
|
||||
if router == nil {
|
||||
return nil
|
||||
}
|
||||
return router.Provide(ctx, c, true)
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user