mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +01:00
refactor: don't prevent startup if staticDir is undefined
https://community.nodebb.org/topic/16790/problems-with-upgrading-to-2-xx
This commit is contained in:
@@ -106,6 +106,11 @@ Data.getStaticDirectories = async function (pluginData) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const dirPath = await resolveModulePath(pluginData.path, pluginData.staticDirs[route]);
|
const dirPath = await resolveModulePath(pluginData.path, pluginData.staticDirs[route]);
|
||||||
|
if (!dirPath) {
|
||||||
|
winston.warn(`[plugins/${pluginData.id}] Invalid mapped path specified: ${
|
||||||
|
route} => ${pluginData.staticDirs[route]}`);
|
||||||
|
return;
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
const stats = await fs.promises.stat(dirPath);
|
const stats = await fs.promises.stat(dirPath);
|
||||||
if (!stats.isDirectory()) {
|
if (!stats.isDirectory()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user