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
In some cases, you may end up with something like this:
import{someApp}from'wherever';// Assume this package bundles polka, so it has its own copyimportpolkafrom'polka';constserver=polka();constapp=someApp();app.server;// a Polka instanceserver.use(app.server);// error since `!(app.server instanceof Polka)`
you shouldn't run into this often since your package manager would usually de-dupe and you'd have a single polka version
however, its very possible something you depend on which consumes polka instances (or any polka types) is pinned to an older 1.x than you are for example.
to solve this, maybe instead of base instanceof Polka, we can brand the class and check for that instead (some sort of _$polkaVersion or something, so we can also only consume same-major instances)
In some cases, you may end up with something like this:
you shouldn't run into this often since your package manager would usually de-dupe and you'd have a single polka version
however, its very possible something you depend on which consumes polka instances (or any polka types) is pinned to an older 1.x than you are for example.
to solve this, maybe instead of
base instanceof Polka
, we can brand the class and check for that instead (some sort of_$polkaVersion
or something, so we can also only consume same-major instances)polka/packages/polka/index.js
Line 28 in 08a6f63
The text was updated successfully, but these errors were encountered: