@@ -216,12 +216,12 @@ export const ExtensionDetail: FunctionComponent = () => {
216216
217217 const renderExtension = ( extension : Extension ) : ReactNode => {
218218 const tab = versionPointsToTab ( version ) ? version as string : 'overview' ;
219- const headerTheme = extension . galleryTheme || pageSettings . themeType || 'light' ;
219+ const headerTheme = extension . galleryTheme ?? pageSettings . themeType ?? 'light' ;
220220 const headerColor = headerTheme === 'dark' ? '#fff' : '#151515' ;
221221 return < >
222222 < Box
223223 sx = { {
224- bgcolor : extension . galleryColor || 'neutral.dark' ,
224+ bgcolor : extension . galleryColor ?? 'neutral.dark' ,
225225 color : headerColor
226226 } }
227227 >
@@ -240,7 +240,7 @@ export const ExtensionDetail: FunctionComponent = () => {
240240 < Box
241241 component = 'img'
242242 src = { icon || pageSettings . urls . extensionDefaultIcon }
243- alt = { extension . displayName || extension . name }
243+ alt = { extension . displayName ?? extension . name }
244244 sx = { {
245245 height : '7.5rem' ,
246246 maxWidth : '9rem' ,
@@ -289,7 +289,7 @@ export const ExtensionDetail: FunctionComponent = () => {
289289 >
290290 < WarningIcon fontSize = 'large' />
291291 < Box ml = { 1 } >
292- This version of the “{ extension . displayName || extension . name } ” extension was published
292+ This version of the “{ extension . displayName ?? extension . name } ” extension was published
293293 by < Link href = { extension . publishedBy . homepage } >
294294 { extension . publishedBy . loginName }
295295 </ Link > . That user account is not a verified publisher of
@@ -320,7 +320,7 @@ export const ExtensionDetail: FunctionComponent = () => {
320320 < Box overflow = 'auto' sx = { { pt : 1 , overflow : 'visible' } } >
321321 < Badge color = 'secondary' badgeContent = 'Preview' invisible = { ! extension . preview } sx = { previewBadgeStyle } >
322322 < Typography variant = 'h5' sx = { { fontWeight : 'bold' , mb : 1 } } >
323- { extension . displayName || extension . name }
323+ { extension . displayName ?? extension . name }
324324 </ Typography >
325325 </ Badge >
326326 < Box
@@ -335,7 +335,7 @@ export const ExtensionDetail: FunctionComponent = () => {
335335 < StyledRouteLink
336336 to = { createRoute ( [ NamespaceDetailRoutes . ROOT , extension . namespace ] ) }
337337 style = { { color : themeColor } } >
338- { extension . namespaceDisplayName || extension . namespace }
338+ { extension . namespaceDisplayName ?? extension . namespace }
339339 </ StyledRouteLink >
340340 </ Box >
341341 < TextDivider themeType = { themeType } collapseSmall = { true } />
@@ -373,7 +373,7 @@ export const ExtensionDetail: FunctionComponent = () => {
373373 `Average rating: ${ getRoundedRating ( extension . averageRating ) } out of 5 (${ extension . reviewCount } reviews)`
374374 : 'Not rated yet'
375375 } >
376- < ExportRatingStars number = { extension . averageRating || 0 } fontSize = 'small' />
376+ < ExportRatingStars number = { extension . averageRating ?? 0 } fontSize = 'small' />
377377 ({ reviewCountFormatted } )
378378 </ StyledLink >
379379 </ Box >
@@ -410,7 +410,7 @@ export const ExtensionDetail: FunctionComponent = () => {
410410 user . avatarUrl ?
411411 < Avatar
412412 src = { user . avatarUrl }
413- alt = { user . fullName || user . loginName }
413+ alt = { user . fullName ?? user . loginName }
414414 variant = 'rounded'
415415 sx = { { width : '60px' , height : '60px' } } />
416416 : null
@@ -449,7 +449,7 @@ export const ExtensionDetail: FunctionComponent = () => {
449449 href = { extension . files . license }
450450 sx = { { color : themeColor } }
451451 title = { extension . license ? 'License type' : undefined } >
452- { extension . license || 'Provided license' }
452+ { extension . license ?? 'Provided license' }
453453 </ StyledLink > ;
454454 } else if ( extension . license ) {
455455 return extension . license ;
0 commit comments