Skip to content

Commit e0b3c64

Browse files
committed
fix: do not attempt to generate types when there are no routes
1 parent 8f50d0c commit e0b3c64

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/router/main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -638,7 +638,7 @@ export class Router {
638638
* be registered first so that they do not have any domain prefix in case
639639
* of a naming conflict.
640640
*/
641-
this.routes['root'].forEach((route) => trackRoute.bind(this)(route))
641+
this.routes['root']?.forEach((route) => trackRoute.bind(this)(route))
642642
domains.forEach((domain) =>
643643
this.routes[domain].forEach((route) => trackRoute.bind(this)(route, domain))
644644
)

0 commit comments

Comments
 (0)