fix: bug
This commit is contained in:
@@ -68,7 +68,7 @@ export async function loadCSV<T = Record<string, string>>(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<T extends JSONObject> (body: string, currentRow
|
||||
return `{{${key}}}`;
|
||||
}
|
||||
|
||||
return body.replace(/\{\{(\w+)\}\}/g, (_, key) => `${replaceProp(key)}`);
|
||||
return body?.replace(/\{\{(\w+)\}\}/g, (_, key) => `${replaceProp(key)}`) || '';
|
||||
}
|
||||
Reference in New Issue
Block a user