Skip to content

Commit 8de32b0

Browse files
committed
fixed the nil check
Signed-off-by: Frederic BIDON <[email protected]>
1 parent c364773 commit 8de32b0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

middleware/context.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ type contentTypeValue struct {
307307

308308
// BasePath returns the base path for this API
309309
func (c *Context) BasePath() string {
310-
if c.spec != nil {
310+
if c.spec == nil {
311311
return ""
312312
}
313313
return c.spec.BasePath()

0 commit comments

Comments
 (0)