Browse Source

lint

master
Mel O'Hagan 4 years ago
parent
commit
0ead7fca54
  1. 5
      packages/server/src/integrations/mongodb.ts

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

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

Loading…
Cancel
Save