fix: no playback (#92)

This commit is contained in:
Xmader 2020-12-06 00:51:51 -05:00
parent 63ac2030a9
commit 9491f6c848
No known key found for this signature in database
GPG Key ID: A20B97FB9EB730E4
1 changed files with 2 additions and 2 deletions

View File

@ -36,7 +36,7 @@ const magicHookConstr = (() => {
const iframe = nodes[0] as HTMLIFrameElement
const w = iframe.contentWindow as Window
hookNative(w, 'fetch', (fn) => {
hookNative(w, 'fetch', () => {
return function (url, init) {
const token = init?.headers?.Authorization
if (typeof url === 'string' && token) {
@ -47,7 +47,7 @@ const magicHookConstr = (() => {
l[type]?.(token)
}
}
return fn(url, init)
return fetch(url, init)
}
})
}