Skip to content
This repository was archived by the owner on Aug 9, 2018. It is now read-only.

Commit 08e1fd8

Browse files
Don't blow up if the route doesn't have $$route defined.
In particular, this happens in the 'otherwise' case.
1 parent ad8c69e commit 08e1fd8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ function handleRequest(template, context, modules, request, response) {
6363
// Stash any controller locals we pre-resolved so we can return them
6464
// to the client as a sort of cache so the browser can avoid additional round-trips.
6565
var preResolved = {};
66-
if (route.$$route.resolve) {
66+
if (route.$$route && route.$$route.resolve) {
6767
for (var k in route.$$route.resolve) {
6868
if (route.locals[k] !== undefined) {
6969
preResolved[k] = route.locals[k];

0 commit comments

Comments
 (0)