Fix customAutoLoad loading pageBlocks

fix-timezone-by-ui
Moe 2022-10-11 20:14:33 -07:00
parent 0ecd7606bb
commit 049beaceb5
1 changed files with 3 additions and 6 deletions

View File

@ -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)
}
})
})