From 346b97153fbd9ade061204ebe173f15a9846cd14 Mon Sep 17 00:00:00 2001 From: hypercross Date: Fri, 13 Mar 2026 10:55:43 +0800 Subject: [PATCH] fix: bug --- src/components/utils/csv-loader.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/utils/csv-loader.ts b/src/components/utils/csv-loader.ts index 3c3fc5b..c71c1d3 100644 --- a/src/components/utils/csv-loader.ts +++ b/src/components/utils/csv-loader.ts @@ -68,7 +68,7 @@ export async function loadCSV>(path: string): Promise if (frontmatter) { csvResult.frontmatter = frontmatter; for(const each of result){ - Object.setPrototypeOf(each, frontmatter); + Object.assign(each, frontmatter); } } @@ -97,5 +97,5 @@ export function processVariables (body: string, currentRow return `{{${key}}}`; } - return body.replace(/\{\{(\w+)\}\}/g, (_, key) => `${replaceProp(key)}`); + return body?.replace(/\{\{(\w+)\}\}/g, (_, key) => `${replaceProp(key)}`) || ''; } \ No newline at end of file