make isPrimary and isCluster always booleans
they were strings when using ./nodebb start and boolean if they were in config.json and started with node app.js
This commit is contained in:
Barış Soner Uşaklı
2020-07-07 20:13:14 -04:00
parent 8853cd1aa5
commit c2ca02dfc7
10 changed files with 34 additions and 36 deletions

View File

@@ -116,7 +116,7 @@ Plugins.reload = async function () {
}
// If some plugins are incompatible, throw the warning here
if (Plugins.versionWarning.length && nconf.get('isPrimary') === 'true') {
if (Plugins.versionWarning.length && nconf.get('isPrimary')) {
console.log('');
winston.warn('[plugins/load] The following plugins may not be compatible with your version of NodeBB. This may cause unintended behaviour or crashing. In the event of an unresponsive NodeBB caused by this plugin, run `./nodebb reset -p PLUGINNAME` to disable it.');
for (var x = 0, numPlugins = Plugins.versionWarning.length; x < numPlugins; x += 1) {