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 c05abc1 commit a6e6c71Copy full SHA for a6e6c71
src/gridfs.ts
@@ -31,6 +31,7 @@ import {
31
UrlStorageOptions,
32
DbStorageOptions
33
} from './types';
34
+import hasOwn from "has-own-prop";
35
36
const isGeneratorFn = isGenerator.fn;
37
@@ -455,7 +456,8 @@ export class GridFsStorage extends EventEmitter implements StorageEngine {
455
456
}
457
458
if (this.client) {
- this.connected = this.client.isConnected
459
+ this.connected = hasOwn(this.client, 'isConnected')
460
+ // @ts-ignore
461
? this.client.isConnected()
462
: true;
463
return;
0 commit comments