diff --git a/config/mongodb.js b/config/mongodb.js index 4f7ead0..ac9fb69 100644 --- a/config/mongodb.js +++ b/config/mongodb.js @@ -21,7 +21,7 @@ const init = async function () { }) await admin.save() } catch (err) { - if (err.code === 11000 && err.keyPattern.email) + if (err.code === 11000) logger.debug('admin account already exists') else logger.error(err)