mirror of
https://github.com/johndoe6345789/postgres.git
synced 2026-04-24 13:55:00 +00:00
Fix TypeScript error in ComponentTreeRenderer
Co-authored-by: johndoe6345789 <224850594+johndoe6345789@users.noreply.github.com>
This commit is contained in:
@@ -109,7 +109,7 @@ function interpolateValue(value: any, data: Record<string, any>): any {
|
||||
|
||||
// Check if it's a template string
|
||||
const templateMatch = value.match(/^\{\{(.+)\}\}$/);
|
||||
if (templateMatch) {
|
||||
if (templateMatch && templateMatch[1]) {
|
||||
const expression = templateMatch[1].trim();
|
||||
try {
|
||||
const func = new Function(...Object.keys(data), `return ${expression}`);
|
||||
|
||||
Reference in New Issue
Block a user