File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -110,7 +110,7 @@ export class MediaSelectionItemModal extends React.Component
110110 const thumbnailUrl : string = this . getThumbnailUrl ( mediaItem ) ;
111111
112112 return (
113- < div className = "media-box media-selection-block" onClick = { ( ) => this . props . selectMedia ( mediaItem ) } >
113+ < div className = "media-box media-selection-block" onClick = { ( ) => this . props . selectMedia ( mediaItem ) } key = { mediaItem . key } >
114114 < Image
115115 src = { thumbnailUrl ?? '/assets/images/no-preview.png' }
116116 imageFit = { ImageFit . centerCover }
Original file line number Diff line number Diff line change @@ -73,10 +73,13 @@ export class SettingsModal extends React.Component
7373 }
7474
7575 loadSettings = async ( ) : Promise < void > => {
76- const settings = await this . siteService . getSetting < SiteSettingsContract > ( 'site' ) ;
77- const faviconFile = await this . mediaService . getMediaByKey ( settings . faviconSourceKey ) ;
76+ const settings = await this . siteService . getSetting < SiteSettingsContract > ( 'site' ) ;
7877 this . setState ( { initialSettings : settings , settings : settings } ) ;
79- this . getFaviconThumbnailUrl ( faviconFile ) ;
78+
79+ if ( settings . faviconSourceKey ) {
80+ const faviconFile = await this . mediaService . getMediaByKey ( settings . faviconSourceKey ) ;
81+ this . getFaviconThumbnailUrl ( faviconFile ) ;
82+ }
8083 }
8184
8285 getFaviconThumbnailUrl = async ( faviconFile : MediaContract ) : Promise < void > => {
You can’t perform that action at this time.
0 commit comments