mirror of
https://github.com/openharmony/third_party_jsframework.git
synced 2026-07-18 12:35:31 -04:00
remove new Function in compileAndRunBundle
Signed-off-by: liwenzhen <liwenzhen3@huawei.com> Change-Id: I91995c9f7691ec64e6bfe29faf72f6913bd8c851
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user