Skip to content

Commit

Permalink
fix: make sure result is an instance of query in resource enhancer (#648
Browse files Browse the repository at this point in the history
)
  • Loading branch information
nickschot authored and zacharygolba committed Jan 19, 2017
1 parent 4f4bd16 commit 06d9fc7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/packages/router/route/action/enhancers/resource.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export default function resource(action: Action<any>): Action<any> {
let data;
let total;

if (actionName === 'index') {
if (actionName === 'index' && result instanceof Query) {
[data, total] = await Promise.all([
result,
Query.from(result).count()
Expand Down

0 comments on commit 06d9fc7

Please sign in to comment.