refactor: getRenderContent (#6516)

This commit is contained in:
Katherine 2025-03-20 21:25:08 +08:00 committed by GitHub
parent d902f3c7c1
commit d1ea29c58b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -183,7 +183,9 @@ export async function getRenderContent(templateEngine, content, variables, local
const html = renderedContent({ ...variables?.ctxRef?.current, ...data, $nDate: variableDate });
return await defaultParse(html);
} catch (error) {
if (!/VariablesProvider: .* is not found/.test(error.message)) {
console.log(error);
}
return content;
}
} else {
@ -191,7 +193,9 @@ export async function getRenderContent(templateEngine, content, variables, local
const html = await replaceVariableValue(content, variables, localVariables);
return await defaultParse(html);
} catch (error) {
if (!/VariablesProvider: .* is not found/.test(error.message)) {
console.log(error);
}
return content;
}
}