From ea2dce3ba1b6027202d69e367e46d5cf6080330b Mon Sep 17 00:00:00 2001 From: purocean Date: Fri, 22 Nov 2024 21:15:00 +0800 Subject: [PATCH] fix(plantuml): correct cache --- src/main/server/plantuml.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/server/plantuml.ts b/src/main/server/plantuml.ts index 17c00636..bd6796be 100644 --- a/src/main/server/plantuml.ts +++ b/src/main/server/plantuml.ts @@ -99,7 +99,7 @@ export default async function (data: string): Promise<{ content: any, type: stri } else { const url = api.replace('{data}', plantumlBase64(data)) const dispatcher = await getAction('get-proxy-dispatcher')(url) - let type = '' + let type = api.includes('/svg/') ? 'image/svg+xml' : 'image/png' const cacheKey = getCacheKey(api, type, data) const content = await getCacheData(cacheKey, async () => {