We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2085c5a commit 3c6f9c1Copy full SHA for 3c6f9c1
packages/tracing/src/integrations/node/mongo.ts
@@ -94,8 +94,9 @@ interface MongoCursor {
94
95
function isCursor(value: unknown): value is MongoCursor {
96
return (
97
- typeof value === 'function' &&
98
- value?.constructor?.name.indexOf('Cursor') !== -1 &&
+ typeof value === 'object' &&
+ !!value &&
99
+ value.constructor.name.indexOf('Cursor') !== -1 &&
100
'once' in value &&
101
typeof (value as MongoCursor).once === 'function'
102
);
0 commit comments