Navigation Menu

Skip to content

Commit

Permalink
fix: tests
Browse files Browse the repository at this point in the history
  • Loading branch information
julianlam committed Jul 22, 2019
1 parent 8b1fc5c commit 87552c5
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/meta/themes.js
Expand Up @@ -93,12 +93,12 @@ Themes.set = async (data) => {
'theme:templates': '',
'theme:src': '',
};
const current = await Meta.configs.get('theme:id');
let config = await fsReadfile(path.join(nconf.get('themes_path'), data.id, 'theme.json'), 'utf8');
config = JSON.parse(config);

switch (data.type) {
case 'local':
case 'local': {
const current = await Meta.configs.get('theme:id');
var config = await fsReadfile(path.join(nconf.get('themes_path'), data.id, 'theme.json'), 'utf8');
config = JSON.parse(config);
await db.sortedSetRemove('plugins:active', current);
await db.sortedSetAdd('plugins:active', 0, data.id);

Expand All @@ -120,6 +120,7 @@ Themes.set = async (data) => {

Meta.reloadRequired = true;
break;
}
case 'bootswatch':
await Meta.configs.setMultiple({
'theme:src': data.src,
Expand Down

0 comments on commit 87552c5

Please sign in to comment.