Skip to content

Commit

Permalink
Fix wrong button being hidden.
Browse files Browse the repository at this point in the history
  • Loading branch information
BigJk committed Nov 17, 2023
1 parent 65ffe5e commit 35476ba
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion frontend/src/js/ui/views/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ export default (): m.Component => {
label: 'Type',
description: 'The type of printer you are using',
customComponent: m(Select, {
keys: Object.keys(printer.value).filter((k) => Object.keys(printer.value[k]).length > 0),
keys: Object.keys(printer.value).filter((k) => Object.keys(printer.value[k] ?? {}).length > 0),
selected: settingsCopy.printerType,
onInput: (e) => {
settingsCopy = { ...settingsCopy, printerType: e.value };
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/js/ui/views/template/single.ts
Original file line number Diff line number Diff line change
Expand Up @@ -311,8 +311,8 @@ export default (): m.Component<SingleTemplateProps> => {
onRendered: (html) => (state.lastRendered = html),
tabs: [
{ icon: 'filing', label: 'Entries' },
{ icon: 'planet', label: 'AI Tools' },
...(settings.value.aiEnabled ? [{ icon: 'clipboard', label: 'Information' }] : []),
...(settings.value.aiEnabled ? [{ icon: 'planet', label: 'AI Tools' }] : []),
{ icon: 'clipboard', label: 'Information' },
...(state.template?.config && state.template?.config.length > 0 ? [{ icon: 'options', label: 'Config' }] : []),
{ icon: 'search', label: 'Advanced Filter' },
],
Expand Down

0 comments on commit 35476ba

Please sign in to comment.