0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-24 18:32:41 +00:00

Test code to reduce duplicate theme loading

This shorts out loading of 5ePHB and/or blank from getBrewThemeParent
This commit is contained in:
David Bolack
2024-05-06 12:12:46 -05:00
parent ef25139ffe
commit 3dde6a098c

View File

@@ -290,6 +290,8 @@ const api = {
getBrewThemeParent : async (req, res)=>{
const brew = req.brew;
splitTextStyleAndMetadata(brew);
// Test Hard Ignoring 5ePHB and 5eBlank due to being used for editor theming.
if((req.brew.theme == '5ePHB') ||(req.brew.theme == 'Blank')) return res.status(200).send('');
res.setHeader('Content-Type', 'text/css');
const staticTheme = `/css/${req.brew.renderer}/${req.brew.theme}`;
const userTheme = `/css/${req.brew.theme.slice(1)}`;