From 049beaceb5ea095c0113b9c5232beef789577696 Mon Sep 17 00:00:00 2001 From: Moe Date: Tue, 11 Oct 2022 20:14:33 -0700 Subject: [PATCH] Fix customAutoLoad loading pageBlocks --- libs/customAutoLoad.js | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/libs/customAutoLoad.js b/libs/customAutoLoad.js index 97026eeb..c08b9106 100644 --- a/libs/customAutoLoad.js +++ b/libs/customAutoLoad.js @@ -202,6 +202,7 @@ module.exports = async (s,config,lang,app,io) => { fs.readdir(webFolder,function(err,webFolderContents){ webFolderContents.forEach(function(name){ switch(name){ + case'assets': case'libs': case'pages': if(name === 'libs'){ @@ -243,9 +244,6 @@ module.exports = async (s,config,lang,app,io) => { case'css': s.customAutoLoadTree[blockPrefix + 'LibsCss'].push(filename) break; - case'blocks': - s.customAutoLoadTree[blockPrefix + 'PageBlocks'].push(fullPath) - break; } }else if(name === 'assets'){ switch(libName){ @@ -255,10 +253,9 @@ module.exports = async (s,config,lang,app,io) => { case'css': s.customAutoLoadTree[blockPrefix + 'AssetsCss'].push(filename) break; - case'blocks': - s.customAutoLoadTree[blockPrefix + 'PageBlocks'].push(fullPath) - break; } + }else if(name === 'pages' && libName === 'blocks'){ + s.customAutoLoadTree[blockPrefix + 'PageBlocks'].push(fullPath) } }) })