From 72ba8bcd6426d0d1fb896c08adfdb4cf76051913 Mon Sep 17 00:00:00 2001 From: Manav Rathi Date: Mon, 23 Sep 2024 15:30:58 +0530 Subject: [PATCH] Fix crash on viewing exif with the following data: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit { "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 ????" } } } } --- web/apps/photos/src/components/PhotoViewer/FileInfo/index.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/web/apps/photos/src/components/PhotoViewer/FileInfo/index.tsx b/web/apps/photos/src/components/PhotoViewer/FileInfo/index.tsx index bdcb2a7c1d..20157caab7 100644 --- a/web/apps/photos/src/components/PhotoViewer/FileInfo/index.tsx +++ b/web/apps/photos/src/components/PhotoViewer/FileInfo/index.tsx @@ -566,7 +566,8 @@ const RawExif: React.FC = ({ } else if ( tag && typeof tag == "object" && - "description" in tag + "description" in tag && + typeof tag.description == "string" ) { description = tag.description; }