Closed vjpr closed 6 years ago
knex:client acquired connection from pool: __knexUid1 +12s knex:query select "user"."id" from "user" +12s -------------------- query: __knexUid: __knexUid1 method: select options: timeout: false cancelOnTimeout: false bindings: (empty array) __knexQueryUid: fe9f1ebd-5a2a-42da-8f02-a4929e4d7626 toNative: function() {} sql: select "user"."id" from "user" -------------------- knex:bindings [] +12s knex:client releasing connection to pool: __knexUid1 +1ms { result: undefined } { TypeError: Cannot read property '$toJson' of undefined
result is null here.
result
null
function toJson(result) { if (_.isArray(result)) { for (let i = 0, l = result.length; i < l; ++i) { result[i] = result[i].$toJson(); } } else { result = result.$toJson(); } return result; }
Tested, works.
result
isnull
here.