From 39a5ad55122d6f6b8908cacfbf77a8178c73b01b Mon Sep 17 00:00:00 2001 From: liwenzhen Date: Sat, 19 Nov 2022 18:27:11 +0800 Subject: [PATCH] fixed e3accfc from https://gitee.com/liwenzhen3/third_party_jsframework/pulls/762 remove new Function in compileAndRunBundle Signed-off-by: liwenzhen Change-Id: I91995c9f7691ec64e6bfe29faf72f6913bd8c851 --- runtime/main/page/entry/init.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/runtime/main/page/entry/init.ts b/runtime/main/page/entry/init.ts index 0a0b4ce..2de3f72 100644 --- a/runtime/main/page/entry/init.ts +++ b/runtime/main/page/entry/init.ts @@ -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; } } -- GitLab