Skip to content

Commit

Permalink
[patch][bug] should always return promise object. (#519)
Browse files Browse the repository at this point in the history
  • Loading branch information
khayong authored and jchip committed Aug 6, 2017
1 parent febd37f commit a747804
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/electrode-react-webapp/lib/react-webapp.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ function makeRouteHandler(routeOptions, userContent) {
const callUserContent = content => {
const x = content(options.request);
return !x.catch
? x
? Promise.resolve(x)
: x.catch(err => {
return Promise.reject({
status: err.status || HTTP_ERROR_500,
Expand Down

0 comments on commit a747804

Please sign in to comment.