mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-08 10:56:15 -08:00
Update iframe.helper.js
This commit is contained in:
1 parent
fb96049de9
commit
08f284a64b
1 file changed
+1
-1
@@ -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 });
|
||||
|
||||
Reference in new issue
Block a user