Skip to content

Commit

Permalink
fix: enclose nullability check before comparing
Browse files Browse the repository at this point in the history
  • Loading branch information
noaione authored and ferferga committed Aug 15, 2023
1 parent a11e4cf commit 30214a9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
:name="t('mediaInfoGenericProfile')"
:value="stream.Profile" />
<media-detail-attr
v-if="stream.Level ?? 0 > 0"
v-if="(stream.Level ?? 0) > 0"
:name="t('mediaInfoVideoLevel')"
:value="stream.Level ?? 0" />
<media-detail-attr
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<v-card-text
v-if="selectedMediaSource"
class="pa-3 d-flex flex-column flex-grow-1">
<template v-if="selectedMediaSource.MediaStreams?.length ?? 0 > 0">
<template v-if="(selectedMediaSource.MediaStreams?.length ?? 0) > 0">
<v-tabs v-model="currentTab" direction="horizontal" center-active>
<v-tab value="general">{{ $t('general') }}</v-tab>
<v-tab
Expand Down Expand Up @@ -229,7 +229,7 @@ const mediaSources = computed<MediaSourceInfo[]>(() => {
return props.item.MediaSources ?? [];
});
const displayName = computed<string | undefined>(() => {
if (props.item.MediaSources?.length ?? 0 > 1) {
if ((props.item.MediaSources?.length ?? 0) > 1) {
const parent = props.item.Name;
if (parent) {
Expand Down

0 comments on commit 30214a9

Please sign in to comment.