Skip to content

Commit 7be8dc7

Browse files
committed
cleanup
1 parent 44ae06f commit 7be8dc7

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

__tests__/routes_mounted.test.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,11 @@ function routeExists(stack, testPath) {
2525
if (layer.matchers && layer.matchers.length > 0) {
2626
const matcher = layer.matchers[0]
2727
const match = matcher(testPath)
28-
if (match && match.path) {
29-
return true
30-
}
28+
if (match && match.path) return true
3129
}
3230
// Also check route.path directly if it exists
3331
if (layer.route && layer.route.path) {
34-
if (layer.route.path === testPath || layer.route.path.includes(testPath)) {
35-
return true
36-
}
32+
if (layer.route.path === testPath || layer.route.path.includes(testPath)) return true
3733
}
3834
}
3935
return false

0 commit comments

Comments
 (0)