mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-03 20:45:58 +01:00
typechecking plugin loading
This commit is contained in:
@@ -68,6 +68,10 @@ var fs = require('fs'),
|
|||||||
plugins.push(meta.config['theme:id']);
|
plugins.push(meta.config['theme:id']);
|
||||||
|
|
||||||
async.each(plugins, function(plugin, next) {
|
async.each(plugins, function(plugin, next) {
|
||||||
|
if (!plugin) {
|
||||||
|
return next();
|
||||||
|
}
|
||||||
|
|
||||||
var modulePath = path.join(__dirname, '../node_modules/', plugin);
|
var modulePath = path.join(__dirname, '../node_modules/', plugin);
|
||||||
if (fs.existsSync(modulePath)) {
|
if (fs.existsSync(modulePath)) {
|
||||||
Plugins.loadPlugin(modulePath, next);
|
Plugins.loadPlugin(modulePath, next);
|
||||||
|
|||||||
Reference in New Issue
Block a user