You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the polka instance is placed inside an object, it looses it's own this binding.
One of my repo's handles this by taking in the contructor and binding the used methods again, but I wanted to know
if it would be possible to add them in the source itself?
This is a
this
problem.When the polka instance is placed inside an object, it looses it's own
this
binding.One of my repo's handles this by taking in the contructor and binding the used methods again, but I wanted to know
if it would be possible to add them in the source itself?
Here's the file doing it for a particular use case.
https://github.com/barelyhuman/preact-ssr-starter/blob/3cb40c7eaf4bcdf985eafdd87efd0fc68e0ce767/src/lib/polka.js
I'm not sure of how often people have this usecase considering it is a micro server, but if it makes sense I don't mind raising a PR
The text was updated successfully, but these errors were encountered: