Skip to content

Commit 2ffc31a

Browse files
In ReactReduxSpa template, better report failure to match client-side routes
1 parent a881ca5 commit 2ffc31a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

templates/ReactReduxSpa/ClientApp/boot-server.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@ export default function (params: any): Promise<{ html: string }> {
1414
throw error;
1515
}
1616

17+
// If it didn't match any route, renderProps will be undefined
18+
if (!renderProps) {
19+
throw new Error(`The location '${ params.url }' doesn't match any route configured in react-router.`);
20+
}
21+
1722
// Build an instance of the application
1823
const store = configureStore();
1924
const app = (

0 commit comments

Comments
 (0)