Skip to content

Commit

Permalink
minor bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
seydx committed Oct 2, 2021
1 parent eea0737 commit 1f609cd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions homebridge-ui/ui/src/mixins/homebridge.mixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export default {

if ((tvCache.apps && !tvCache.apps.length) || !tvCache.apps) {
delete configSchema.schema.tvs.properties.apps.items.properties.identifier.oneOf;
} else if (tvCache.apps && tvCache.apps.length) {
} else {
tvCache.apps.forEach((app) => {
if (app && app.name) {
configSchema.schema.tvs.properties.apps.items.properties.identifier.oneOf.push({
Expand Down Expand Up @@ -164,7 +164,7 @@ export default {
.filter((channel) => channel);
}

if (tvCache.commands && !tvCache.commands.length) {
if ((tvCache.commands && !tvCache.commands.length) || !tvCache.commands) {
delete configSchema.schema.tvs.properties.commands.items.properties.value.oneOf;
delete configSchema.schema.tvs.properties.remote.items.properties.command.oneOf;
delete configSchema.schema.tvs.properties.macros.items.properties.commands.items.oneOf;
Expand Down Expand Up @@ -241,7 +241,7 @@ export default {
.filter((command) => command);
}

if (tvCache.inputs && !tvCache.inputs.length) {
if ((tvCache.inputs && !tvCache.inputs.length) || !tvCache.inputs) {
configSchema.schema.tvs.properties.inputs = {
title: 'TV Inputs',
type: 'array',
Expand Down

0 comments on commit 1f609cd

Please sign in to comment.