mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-07 07:42:39 +00:00
Additional theme based error checking.
This commit is contained in:
@@ -211,7 +211,8 @@ const MetadataEditor = createClass({
|
||||
});
|
||||
};
|
||||
|
||||
const currentTheme = mergedThemes[`${_.upperFirst(this.props.metadata.theme[0] === '#' ? 'Brew' : this.props.metadata.renderer)}`][this.props.metadata.theme];
|
||||
const currentThemePath = this.props.metadata?.theme && this.props.metadata.theme[0] === '#' ? 'Brew' : this.props.metadata.renderer;
|
||||
const currentTheme = mergedThemes[`${_.upperFirst(currentThemePath)}`][this.props.metadata.theme];
|
||||
let dropdown;
|
||||
|
||||
if(this.props.metadata.renderer == 'legacy') {
|
||||
|
||||
@@ -84,7 +84,7 @@ const Snippetbar = createClass({
|
||||
|
||||
compileSnippets : function(rendererPath, themePath, snippets) {
|
||||
let compiledSnippets = snippets;
|
||||
const baseSnippetsPath = themePath[0] != '#' ? Themes[rendererPath][themePath].baseSnippets : false;
|
||||
const baseSnippetsPath = themePath && (themePath[0] === '#') ? false : Themes[rendererPath][themePath].baseSnippets;
|
||||
|
||||
const objB = _.keyBy(compiledSnippets, 'groupName');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user