@@ -25,7 +25,7 @@ const emptyLicense: License = {
25
25
license_status : LicenseStatus . Unavailable ,
26
26
license_extension_url : "" ,
27
27
licenseEdition : computed ( ( ) => {
28
- return license . license_type && license . edition ? ", " + license . edition : "" ;
28
+ return ` ${ license . license_type } ${ license . edition ? `, ${ license . edition } ` : "" } ` ;
29
29
} ) ,
30
30
formattedInstanceName : computed ( ( ) => {
31
31
return license . instance_name || "Upgrade ServiceControl to v3.4.0+ to see more information about this license" ;
@@ -115,6 +115,7 @@ function getSubscriptionDaysLeft(license: UnwrapNestedRefs<License>) {
115
115
const isExpiring = license . license_status === "ValidWithExpiringSubscription" ;
116
116
117
117
const expiringIn = useGetDayDiffFromToday ( license . expiration_date ) ;
118
+ if ( isNaN ( expiringIn ) ) return "" ;
118
119
if ( ! isExpiring ) return " - " + expiringIn + " days left" ;
119
120
if ( expiringIn === 0 ) return " - expiring today" ;
120
121
if ( expiringIn === 1 ) return " - expiring tomorrow" ;
@@ -127,6 +128,7 @@ function getTrialDaysLeft(license: UnwrapNestedRefs<License>) {
127
128
const isExpiring = license . license_status === "ValidWithExpiringTrial" ;
128
129
129
130
const expiringIn = useGetDayDiffFromToday ( license . expiration_date ) ;
131
+ if ( isNaN ( expiringIn ) ) return "" ;
130
132
if ( ! isExpiring ) return " - " + expiringIn + " days left" ;
131
133
if ( expiringIn === 0 ) return " - expiring today" ;
132
134
if ( expiringIn === 1 ) return " - expiring tomorrow" ;
@@ -137,6 +139,7 @@ function getUpgradeDaysLeft(license: UnwrapNestedRefs<License>) {
137
139
if ( license . license_status === "InvalidDueToExpiredUpgradeProtection" ) return " - expired" ;
138
140
139
141
const expiringIn = useGetDayDiffFromToday ( license . upgrade_protection_expiration ) ;
142
+ if ( isNaN ( expiringIn ) ) return "" ;
140
143
if ( expiringIn <= 0 ) return " - expired" ;
141
144
if ( expiringIn === 0 ) return " - expiring today" ;
142
145
if ( expiringIn === 1 ) return " - 1 day left" ;
0 commit comments