From 10bc22d4d969f16cf99a0de74b285943e1719a8c Mon Sep 17 00:00:00 2001 From: Ramesh Mane <101566080+rameshmane7218@users.noreply.github.com> Date: Tue, 20 Feb 2024 06:06:24 +0000 Subject: [PATCH] fix: pw test fail issue --- packages/nc-gui/utils/fileUtils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/nc-gui/utils/fileUtils.ts b/packages/nc-gui/utils/fileUtils.ts index d0fb9e00d1..c81334d1ae 100644 --- a/packages/nc-gui/utils/fileUtils.ts +++ b/packages/nc-gui/utils/fileUtils.ts @@ -84,7 +84,7 @@ export function extractImageSrcFromRawHtml(rawText: string) { export function populateUniqueFileName(fn: string, attachments: any[], mimeType: string) { // If the image extension is not present, the while loop will go into an infinite loop. So, add the extension first if not present. - if (!isImage(fn)) { + if (!fn?.endsWith(mimeType.split('/')[1])) { fn = `${fn}.${mimeType.split('/')[1]}` }