do not provide if nil router

This commit is contained in:
gammazero 2025-11-11 16:38:33 -10:00
parent 91c4b28d04
commit e0a0559e52

View File

@ -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)
}