mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-05-09 23:49:27 +08:00
refactor: getRenderContent (#6516)
This commit is contained in:
parent
d902f3c7c1
commit
d1ea29c58b
@ -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;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user