This commit is contained in:
Rizky 2024-04-09 01:08:52 +07:00
parent 35be7e00f0
commit 2515a66fc3
1 changed files with 4 additions and 2 deletions

View File

@ -165,9 +165,10 @@ export const EdScriptMonaco: FC<{}> = () => {
`const typings = `.length
);
const typings_fn = new Function(
"active",
`return ${typings_src}`
);
const typings = typings_fn();
const typings = typings_fn(active);
if (typeof typings === "object") {
for (const [k, v] of Object.entries(typings)) {
if (typeof v === "string") {
@ -200,9 +201,10 @@ export const EdScriptMonaco: FC<{}> = () => {
`const typings = `.length
);
const typings_fn = new Function(
"active",
`return ${typings_src}`
);
const typings = typings_fn();
const typings = typings_fn(active);
for (const [k, v] of Object.entries(typings)) {
if (typeof v === "string") {
types[k] = v;