remove new Function in compileAndRunBundle

Signed-off-by: liwenzhen <liwenzhen3@huawei.com>
Change-Id: I91995c9f7691ec64e6bfe29faf72f6913bd8c851
This commit is contained in:
liwenzhen
2022-11-19 18:27:11 +08:00
parent 92b5285dd2
commit 48d8bbc7f8
+2 -2
View File
@@ -141,8 +141,8 @@ export function compileBundle(functionCode: string, file: string, ...args: objec
// If failed to run code on native, then run code on framework.
if (!compileBundleNative(funcKeys, funcValues, functionCode, file)) {
const resolveFunction: Function = new Function(funcKeys.toString(), functionCode);
return resolveFunction(...funcValues);
Log.error(`Compile js bundle failed, typeof code is not 'function'`)
return;
}
}