mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2026-09-09 18:03:21 +00:00
fix: handle optional error code in file upload error key retrieval
- Updated the getFileUploadErrorKey method to accept an optional errorCode parameter, allowing for better handling of undefined or null values. - This change improves the robustness of error message generation in the file uploading list row component.
This commit is contained in:
@@ -117,7 +117,7 @@ export class FileUploadingListRowComponent {
|
||||
return this.file?.status === FileUploadStatus.Complete && this.isUploadVersion();
|
||||
}
|
||||
|
||||
getFileUploadErrorKey(errorCode: number): string {
|
||||
getFileUploadErrorKey(errorCode?: number | null): string {
|
||||
return `FILE_UPLOAD.ERRORS.${errorCode || 'GENERIC'}`;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user