Skip to content

Commit 68b4048

Browse files
committed
Fix conf reconfig
1 parent 76f7e35 commit 68b4048

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

database/init/00-replica-set.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ function ensurePrimaryHost(forceReconfig) {
1313
try {
1414
conf = rs.conf();
1515
} catch (error) {
16-
if (!forceReconfig || !db.getSiblingDB("local").system.replset.findOne()) {
16+
conf = db.getSiblingDB("local").system.replset.findOne();
17+
if (!forceReconfig || !conf) {
1718
throw error;
1819
}
1920
}

0 commit comments

Comments
 (0)