Skip to content

Commit 7b83e86

Browse files
committed
Fix Promise detection, fixes #1
1 parent c78e8f7 commit 7b83e86

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

html_rewriter.js.patch

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
--- pkg/html_rewriter.js 2021-07-22 16:09:24.000000000 +0100
2-
+++ pkg2/html_rewriter.js 2021-07-22 16:10:13.000000000 +0100
1+
--- pkg/html_rewriter.js 2021-07-24 10:12:13.000000000 +0100
2+
+++ pkg2/html_rewriter.js 2021-07-24 10:11:57.000000000 +0100
33
@@ -1,7 +1,7 @@
44
let imports = {};
55
imports['__wbindgen_placeholder__'] = module.exports;
@@ -194,7 +194,17 @@
194194
}
195195
/**
196196
* @returns {boolean}
197-
@@ -847,5 +868,6 @@
197+
@@ -801,7 +822,8 @@
198+
}, arguments) };
199+
200+
module.exports.__wbg_instanceof_Promise_c6535fc791fcc4d2 = function(arg0) {
201+
- var ret = getObject(arg0) instanceof Promise;
202+
+ var obj = getObject(arg0);
203+
+ var ret = (obj instanceof Promise) || (typeof obj === "object" && typeof obj.then === "function");
204+
return ret;
205+
};
206+
207+
@@ -847,5 +869,6 @@
198208
const wasmModule = new WebAssembly.Module(bytes);
199209
const wasmInstance = new WebAssembly.Instance(wasmModule, imports);
200210
wasm = wasmInstance.exports;

0 commit comments

Comments
 (0)