Skip to content

Commit 2367e93

Browse files
committed
Fixed lookup of isConnected method
1 parent a6e6c71 commit 2367e93

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/gridfs.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ import {
3131
UrlStorageOptions,
3232
DbStorageOptions
3333
} from './types';
34-
import hasOwn from "has-own-prop";
3534

3635
const isGeneratorFn = isGenerator.fn;
3736

@@ -456,9 +455,10 @@ export class GridFsStorage extends EventEmitter implements StorageEngine {
456455
}
457456

458457
if (this.client) {
459-
this.connected = hasOwn(this.client, 'isConnected')
460-
// @ts-ignore
461-
? this.client.isConnected()
458+
// @ts-ignore
459+
this.connected = this.client.isConnected
460+
? // @ts-ignore
461+
this.client.isConnected()
462462
: true;
463463
return;
464464
}

0 commit comments

Comments
 (0)