mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Check that we are using same ObjectId as mongoose
GitOrigin-RevId: 95812e15365bea740dfd02215e706f8014239840
This commit is contained in:
parent
d4cc50bc21
commit
da350a52fd
1 changed files with 1 additions and 1 deletions
|
@ -8,7 +8,7 @@ const { addConnectionDrainer } = require('./GracefulShutdown')
|
||||||
// otherwise we will get multiple versions of the ObjectId class. Mongoose
|
// otherwise we will get multiple versions of the ObjectId class. Mongoose
|
||||||
// patches ObjectId, so loading multiple versions of the mongodb module can
|
// patches ObjectId, so loading multiple versions of the mongodb module can
|
||||||
// cause problems with ObjectId comparisons.
|
// cause problems with ObjectId comparisons.
|
||||||
if (Mongoose.mongo !== mongodb) {
|
if (Mongoose.mongo.ObjectId !== mongodb.ObjectId) {
|
||||||
throw new OError(
|
throw new OError(
|
||||||
'FATAL ERROR: Mongoose is using a different mongodb instance'
|
'FATAL ERROR: Mongoose is using a different mongodb instance'
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue