In ReactReduxSpa template, better report failure to match client-side routes

This commit is contained in:
SteveSandersonMS
2016-06-14 11:35:12 +01:00
parent a881ca5b96
commit 2ffc31a7c6

View File

@@ -14,6 +14,11 @@ export default function (params: any): Promise<{ html: string }> {
throw error;
}
// If it didn't match any route, renderProps will be undefined
if (!renderProps) {
throw new Error(`The location '${ params.url }' doesn't match any route configured in react-router.`);
}
// Build an instance of the application
const store = configureStore();
const app = (