fixing prop option

This commit is contained in:
Rizky 2024-08-19 14:41:14 +07:00
parent 0a98551a9c
commit 366e7dad69
1 changed files with 6 additions and 0 deletions

View File

@ -95,6 +95,12 @@ export const EdPropInstanceOptions: FC<{
if (meta.item.component) { if (meta.item.component) {
for (const [k, v] of Object.entries(meta.item.component.props)) { for (const [k, v] of Object.entries(meta.item.component.props)) {
if (v.valueBuilt && v.valueBuilt.length > 3) { if (v.valueBuilt && v.valueBuilt.length > 3) {
if (v.valueBuilt.startsWith(`const _jsxFileName = "";`)) {
v.valueBuilt = v.valueBuilt.substring(
`const _jsxFileName = "";`.length
);
}
try { try {
const evn = new Function( const evn = new Function(
"arg", "arg",