Skip to content

Commit

Permalink
history.match does not update state
Browse files Browse the repository at this point in the history
  • Loading branch information
mjackson committed Aug 28, 2015
1 parent 16fff9b commit 304302b
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions modules/useRoutes.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,7 @@ function useRoutes(createHistory) {
if (error) {
callback(error);
} else {
state = { ...nextState, components };
callback(null, state);
callback(null, { ...nextState, components });
}
});
}
Expand Down Expand Up @@ -113,8 +112,6 @@ function useRoutes(createHistory) {
result = hooks[i](location);
}

// Callback with the result from the first route
// hook that has a non-null return value.
callback(result);
}
});
Expand All @@ -133,8 +130,6 @@ function useRoutes(createHistory) {
message = hooks[i]();
}

// Return the result from the first route hook
// that returns a prompt message.
return message;
}
}
Expand Down

0 comments on commit 304302b

Please sign in to comment.