Update iframe.helper.js

This commit is contained in:
Harvey Zack committed 2022-10-20 21:54:43 +08:00
1 parent fb96049de9
commit 08f284a64b
1 file changed
+1 -1
+1 -1
View File
@@ -15,7 +15,7 @@ class IframeHelper {
switch (type) {
case 'commit':
try {
if (data.match(/resolve\((.*?)\)/)) {
if (data.match(/\bresolve\((.*?)\)/)) {
const string = `return new Promise(function(resolve){\n${data}\n})`;
const result = await new Function(string)();
IframeHelper.postMessage({ type: 'response', data: result, id });