mirror of
https://activitypub.software/TransFem-org/Sharkey.git
synced 2024-12-15 13:25:44 +01:00
Update is-objectid.ts (#4277)
* Update is-objectid.ts * Update is-objectid.ts
This commit is contained in:
parent
0064dbb010
commit
2776934728
1 changed files with 1 additions and 1 deletions
|
@ -1,5 +1,5 @@
|
||||||
import { ObjectID } from 'mongodb';
|
import { ObjectID } from 'mongodb';
|
||||||
|
|
||||||
export default function(x: any): x is ObjectID {
|
export default function(x: any): x is ObjectID {
|
||||||
return x.hasOwnProperty('toHexString') || x.hasOwnProperty('_bsontype');
|
return x && typeof x === 'object' && (x.hasOwnProperty('toHexString') || x.hasOwnProperty('_bsontype'));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue