Fixes error from mediafile-list.component
when logging out
- If the user is seeing the mediafiles and wants to log out, an error occurred causing by querying an attribute from undefined object.
This commit is contained in:
parent
fc5f6f4e54
commit
4994cc6ce8
@ -117,7 +117,7 @@ export class MediaManageService {
|
||||
* @param action the logo action or font action
|
||||
* @returns A media config object containing the requested values
|
||||
*/
|
||||
public getMediaConfig(action: string): ImageConfigObject | FontConfigObject {
|
||||
public getMediaConfig(action: string): ImageConfigObject | FontConfigObject | null {
|
||||
return this.config.instant(action);
|
||||
}
|
||||
}
|
||||
|
@ -239,7 +239,7 @@ export class MediafileListComponent extends ListViewBaseComponent<ViewMediafile,
|
||||
*/
|
||||
public isUsedAs(file: ViewMediafile, mediaFileAction: string): boolean {
|
||||
const config = this.mediaManage.getMediaConfig(mediaFileAction);
|
||||
return config.path === file.downloadUrl;
|
||||
return config ? config.path === file.downloadUrl : false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user