Update iframe.helper.js

This commit is contained in:
Harvey committed 2022-10-20 17:31:31 +08:00
1 parent 96781698ba
commit 8dcaada8cf
1 file changed
+2 -1
+2 -1
View File
@@ -20,7 +20,8 @@ class IframeHelper {
const result = await new Function(string)();
IframeHelper.postMessage({ type: 'response', data: result, id });
} else {
IframeHelper.postMessage({ type: 'response', data: new Function(data)(), id });
const result = new Function(data)();
IframeHelper.postMessage({ type: 'response', data: result, id });
}
} catch (error) {
IframeHelper.postMessage({ type: 'error', data: error.message, id });