Skip to content

Commit c335b84

Browse files
committed
fix: use count to instead of result[0]['COUNT(0)']
1 parent 22ec1c2 commit c335b84

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/query.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -719,8 +719,8 @@ Query.prototype.count = function(callback) {
719719
count = parseInt(result[0]["COUNT(0)"]) || 0;
720720
}
721721

722-
callback(undefined, result[0]["COUNT(0)"]);
723-
promisor._onExecuteResult(undefined, result[0]["COUNT(0)"]);
722+
callback(undefined, count);
723+
promisor._onExecuteResult(undefined, count);
724724
});
725725

726726
return promisor;

0 commit comments

Comments
 (0)