Skip to content

Commit

Permalink
changed my code back to increase test coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
Nalseaf committed Sep 5, 2024
1 parent 1b16fc8 commit 0516dcd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
Binary file modified dump.rdb
Binary file not shown.
19 changes: 8 additions & 11 deletions src/meta/css.js
Original file line number Diff line number Diff line change
Expand Up @@ -207,22 +207,19 @@ async function getBundleMetadata(target) {
];

// Skin support
let skin = '';
let skin;
let isCustomSkin = false;

if (target.startsWith('client-')) {
const targetSkin = target.split('-').slice(1).join('-');
const isBootswatchSkin = CSS.supportedSkins.includes(targetSkin);

isCustomSkin = !isBootswatchSkin && await CSS.isCustomSkin(targetSkin);
skin = (isBootswatchSkin || isCustomSkin) ? targetSkin : ''; // if it's not a valid skin, don't set it

skin = target.split('-').slice(1).join('-');
const isBootswatchSkin = CSS.supportedSkins.includes(skin);
isCustomSkin = !isBootswatchSkin && await CSS.isCustomSkin(skin);
target = 'client';
if (!isBootswatchSkin && !isCustomSkin) {
skin = ''; // invalid skin or deleted use default
}
}


let themeData = {};

let themeData = null;
if (target === 'client') {
themeData = await db.getObjectFields('config', ['theme:type', 'theme:id', 'useBSVariables', 'bsVariables']);
const themeId = (themeData['theme:id'] || 'nodebb-theme-harmony');
Expand Down

0 comments on commit 0516dcd

Please sign in to comment.