Skip to content

Commit

Permalink
Improve coverage after #49 (#53)
Browse files Browse the repository at this point in the history
  • Loading branch information
frenzzy authored and koistya committed Oct 9, 2016
1 parent a4be5ca commit d3787bc
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions src/resolve.js
Expand Up @@ -50,15 +50,7 @@ async function resolve(routes, pathOrContext) {
context.next = next;
context.end = (data) => { result = data; done = true; return data; };

result = await next();

if ((result === null || result === undefined) && errorRoute) {
context.error = new Error('Not found');
context.error.status = 404;
return await errorRoute.action(context, {});
}

return result;
return await next();
}

export default resolve;

0 comments on commit d3787bc

Please sign in to comment.