Skip to content

Commit 5680354

Browse files
author
alexadrake
committed
use better boolean
1 parent 28db06c commit 5680354

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

controller.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,8 +225,8 @@ type controller struct {
225225
// MiddlewareController will return the speakeasy middleware controller from the current request,
226226
// if the current request is monitored by the speakeasy middleware.
227227
func MiddlewareController(r *http.Request) (*controller, bool) {
228-
c, ok := r.Context().Value(controllerKey).(*controller)
229-
return c, ok
228+
c, _ := r.Context().Value(controllerKey).(*controller)
229+
return c, c != nil
230230
}
231231

232232
// PathHint will allow you to provide a path hint for the current request.

0 commit comments

Comments
 (0)