Skip to content

Commit

Permalink
Prevent possible access to undefined object (#349)
Browse files Browse the repository at this point in the history
  • Loading branch information
streamer45 committed Mar 1, 2023
1 parent 1cb5d62 commit 0a9d75c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const ICEHostOverride = (props: CustomComponentProps) => {
const config = useSelector(getConfig);

// If RTCD is configured then this setting doesn't apply and should be hidden.
if (config.PluginSettings?.Plugins[manifest.id].rtcdserviceurl?.length > 0) {
if (config.PluginSettings?.Plugins[manifest.id]?.rtcdserviceurl?.length > 0) {
return null;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const UDPServerAddress = (props: CustomComponentProps) => {
const config = useSelector(getConfig);

// If RTCD is configured then this setting doesn't apply and should be hidden.
if (config.PluginSettings?.Plugins[manifest.id].rtcdserviceurl?.length > 0) {
if (config.PluginSettings?.Plugins[manifest.id]?.rtcdserviceurl?.length > 0) {
return null;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const UDPServerPort = (props: CustomComponentProps) => {
const config = useSelector(getConfig);

// If RTCD is configured then this setting doesn't apply and should be hidden.
if (config.PluginSettings?.Plugins[manifest.id].rtcdserviceurl?.length > 0) {
if (config.PluginSettings?.Plugins[manifest.id]?.rtcdserviceurl?.length > 0) {
return null;
}

Expand Down

0 comments on commit 0a9d75c

Please sign in to comment.