Skip to content

Commit 10b3494

Browse files
committed
fix(knex): make stack traces work in 0.18+ (elastic#1497)
1 parent bd4ec99 commit 10b3494

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/instrumentation/modules/knex.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ var symbols = require('../../symbols')
77

88
module.exports = function (Knex, agent, { version, enabled }) {
99
if (!enabled) return Knex
10-
if (semver.gte(version, '0.18.0')) {
10+
if (semver.gte(version, '0.21.0')) {
1111
agent.logger.debug('knex version %s not supported - aborting...', version)
1212
return Knex
1313
}

lib/instrumentation/shimmer.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ function logger () {
3232
}
3333

3434
function isFunction (funktion) {
35-
return funktion && {}.toString.call(funktion) === '[object Function]'
35+
return typeof funktion === 'function'
3636
}
3737

3838
function wrap (nodule, name, wrapper) {

0 commit comments

Comments
 (0)