Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/components/router/Router.js
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ class Router {
} else if (Array.isArray(candidate)) {
// Scenario: Array of functions
candidate.forEach((middleware) => this._register_middleware(pattern, middleware));
} else if (typeof candidate == 'object' && candidate.constructor.name === 'Router') {
} else if (candidate instanceof Router) {
// Scenario: Router instance
this._register_router(pattern, candidate);
} else if (candidate && typeof candidate == 'object' && typeof candidate.middleware == 'function') {
Expand Down