mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2025-12-31 10:52:42 +00:00
Rework detection of user brews to look up themeid in static themes list before assuming is a user brew.
Ended up being a fairly straightforward change. A few ternaries got smooshed or inverted. Passes builtin and local tests. Need to compare on the test instance.
This commit is contained in:
@@ -213,8 +213,7 @@ const MetadataEditor = createClass({
|
||||
});
|
||||
};
|
||||
|
||||
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];
|
||||
const currentThemePath = this.props.metadata?.theme && Themes[_.upperFirst(this.props.metadata.renderer)].hasOwnProperty(this.props.metadata?.theme) ? this.props.metadata.renderer : 'Brew';
|
||||
const currentTheme = mergedThemes[`${_.upperFirst(currentThemePath)}`].hasOwnProperty(this.props.metadata.theme) ? mergedThemes[`${_.upperFirst(currentThemePath)}`][this.props.metadata.theme] : { name: `!!! THEME MISSING !!! ID=${this.props.metadata.theme.slice(1)}`};
|
||||
let dropdown;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user