I'm running on Firefox. Using the suggested sample code:
let client = new Client({
...
transport: new FetchTransport(fetch)
})
client.fetchSession()...
Produces the error: TypeError: 'fetch' called on an object that does not implement interface Window. I think this has to do with rebinding fetch(). Instead, the following works for me:
let client = new Client({
...
transport: new FetchTransport(fetch.bind(window))
})
client.fetchSession()...
I'm running on Firefox. Using the suggested sample code:
Produces the error:
TypeError: 'fetch' called on an object that does not implement interface Window
. I think this has to do with rebindingfetch()
. Instead, the following works for me:See this Stack Overflow for possible explanation.