diff --git a/src/backend/model/fileaccess/MetadataLoader.ts b/src/backend/model/fileaccess/MetadataLoader.ts index fd20c8f6..52fa1f41 100644 --- a/src/backend/model/fileaccess/MetadataLoader.ts +++ b/src/backend/model/fileaccess/MetadataLoader.ts @@ -207,10 +207,10 @@ export class MetadataLoader { //in case of failure, set dimensions to 0 so they may be read via tags metadata.size = { width: 0, height: 0 }; } finally { - if (metadata.size.width == undefined || metadata.size.width == null) { + if (isNaN(metadata.size.width) || metadata.size.width == null) { metadata.size.width = 0; } - if (metadata.size.height == undefined || metadata.size.height == null) { + if (isNaN(metadata.size.height) || metadata.size.height == null) { metadata.size.height = 0; } }