0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-24 16:22:44 +00:00

Don't save style tab if user never put anything in it

This commit is contained in:
Trevor Buckner
2021-06-24 23:29:01 -04:00
parent e2280197b9
commit e07bb1b3c2
4 changed files with 18 additions and 25 deletions

View File

@@ -9,7 +9,6 @@ const GoogleActions = require('./server/googleActions.js');
const serveCompressedStaticAssets = require('./server/static-assets.mv.js');
const sanitizeFilename = require('sanitize-filename');
const asyncHandler = require('express-async-handler');
const dedent = require('dedent-tabs').default;
const brewAccessTypes = ['edit', 'share', 'raw'];
@@ -37,14 +36,6 @@ const getBrewFromId = asyncHandler(async (id, accessType)=>{
const index = brew.text.indexOf('```\n\n');
brew.style = brew.text.slice(7, index - 1);
brew.text = brew.text.slice(index + 5);
} else {
brew.style = dedent`
/*=======--- Example CSS styling ---=======*/
/* Any CSS here will apply to your document! */
.myExampleClass {
color: black;
}`;
}
return brew;
});