We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 647de2e commit 43ee0deCopy full SHA for 43ee0de
src/runtime/content/utils.ts
@@ -194,9 +194,21 @@ export function proxyContext(global: any, context: any) {
194
return context[name];
195
}
196
if (special[name] !== undefined) {
197
+ if (
198
+ typeof special[name] === "function" &&
199
+ !(<{ prototype: any }>special[name]).prototype
200
+ ) {
201
+ return (<{ bind: any }>special[name]).bind(global);
202
+ }
203
return special[name];
204
205
if (global[name] !== undefined) {
206
207
+ typeof global[name] === "function" &&
208
+ !(<{ prototype: any }>global[name]).prototype
209
210
+ return (<{ bind: any }>global[name]).bind(global);
211
212
return global[name];
213
214
0 commit comments