Fix crash on viewing exif with the following data:

{
    "tags": {
        "icc": {
            "value": {
                "en-US": "Camera RGB Profile",
                ...
                "zh-CN": "?? RGB ????"
            },
            "description": {
                "en-US": "Camera RGB Profile",
                "es-ES": "Perfil RGB para CÔøΩmara",
                ...
                "zh-CN": "?? RGB ????"
            }
        }
    }
}
This commit is contained in:
Manav Rathi
2024-09-23 15:30:58 +05:30
parent 93f753fdff
commit 72ba8bcd64

View File

@@ -566,7 +566,8 @@ const RawExif: React.FC<RawExifProps> = ({
} else if (
tag &&
typeof tag == "object" &&
"description" in tag
"description" in tag &&
typeof tag.description == "string"
) {
description = tag.description;
}