Skip to content

Commit

Permalink
fix: Don't crash if action/feedback options are missing #53
Browse files Browse the repository at this point in the history
  • Loading branch information
Julusian committed Aug 13, 2023
1 parent 7bc3fa9 commit d4e271d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/internal/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { EncodeIsVisible } from '../host-api/api'
import { CompanionInputFieldBase } from '../module-api/input'

export function serializeIsVisibleFn<T extends CompanionInputFieldBase>(options: T[]): EncodeIsVisible<T>[] {
return options.map((option) => {
return (options ?? []).map((option) => {
if ('isVisible' in option) {
if (typeof option.isVisible === 'function') {
return {
Expand Down

0 comments on commit d4e271d

Please sign in to comment.