mirror of
https://github.com/immich-app/immich.git
synced 2025-05-24 01:12:58 -04:00
add empty array fallback just in case for now
This commit is contained in:
parent
33c9ea1c9c
commit
0da1c3b279
@ -14,7 +14,7 @@ import { IBulkAsset, ImmichFile, UploadFile } from 'src/types';
|
||||
import { checkAccess } from 'src/utils/access';
|
||||
|
||||
export const getAssetFile = (files: AssetFileEntity[], type: AssetFileType | GeneratedImageType) => {
|
||||
return files.find((file) => file.type === type);
|
||||
return (files || []).find((file) => file.type === type);
|
||||
};
|
||||
|
||||
export const getAssetFiles = (files: AssetFileEntity[]) => ({
|
||||
|
Loading…
x
Reference in New Issue
Block a user