Browse Source

lint

pull/7422/head
Mel O'Hagan 4 years ago
parent
commit
e0744000a4
  1. 6
      packages/server/src/integrations/mongodb.ts

6
packages/server/src/integrations/mongodb.ts

@ -92,8 +92,10 @@ module MongoDBModule {
if (json[field] instanceof Object) {
json[field] = self.createObjectIds(json[field])
}
if (typeof json[field] === "string" && json[field].toLowerCase().startsWith("objectid"))
{
if (
typeof json[field] === "string" &&
json[field].toLowerCase().startsWith("objectid")
) {
const id = json[field].match(
/(?<=objectid\(['"]).*(?=['"]\))/gi
)?.[0]

Loading…
Cancel
Save