Merge pull request #4580 from GabrielInTheWorld/form-validation
Fixes error from `mediafile-list.component` when logging out
This commit is contained in:
commit
b05cd3af5a
@ -117,7 +117,7 @@ export class MediaManageService {
|
|||||||
* @param action the logo action or font action
|
* @param action the logo action or font action
|
||||||
* @returns A media config object containing the requested values
|
* @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);
|
return this.config.instant(action);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -239,7 +239,7 @@ export class MediafileListComponent extends ListViewBaseComponent<ViewMediafile,
|
|||||||
*/
|
*/
|
||||||
public isUsedAs(file: ViewMediafile, mediaFileAction: string): boolean {
|
public isUsedAs(file: ViewMediafile, mediaFileAction: string): boolean {
|
||||||
const config = this.mediaManage.getMediaConfig(mediaFileAction);
|
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