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
Rest Hooks version: rest-hooks 6.4.2 and @rest-hooks/rest 5.2.0
Package manager version: yarn 1.22.19
Node version: 16.16.0
Describe the bug
Hi,
On some old safari (14.1.2), I encounter this runtime error: Object.hasOwn is not a function (from NetworkManager.js), which I think comes from this commit bdbc6a4. I'm also not sure why this problem exists since it's supposed to be handled by some transcompiler.
I know Object.hasOwn is too new for safari v14.1, but I'm looking for a solution without upgrading the browser.
My tsconfig has esnext in compilerOptions.lib and I've tried using babel-plugin-transform-object-hasown but it didn't solve the problem.
I've also tried to downgrade rest hooks to some versions earlier than the commit above (bdbc6a4), e.g. rest-hooks 6.3.11 and @rest-hooks/rest 5.1.1 (or even older versions), but it seems that @rest-hooks/core 3.4.0 is always installed (in node_modules) and thus the problem still persists. (How can I install rest hooks without having the Object.hasOwn syntax inside? Maybe it could be one of the easiest solutions.)
To Reproduce
The problem is from a private repo so I can't share it here. I'm using next.js v13 with ts v4.8. I think as long as Object.hasOwn is somewhere in the installed dependencies the error will be thrown.
Expected behavior
No this Object.hasOwn error on Safari v14.1.
P.S. Thanks for this awesome project!
The text was updated successfully, but these errors were encountered:
I'm looking into updating the transpiling process to include imports to the core-js polyfill in the "exports" output.
In the meantime, you can handle this by adding import "core-js"; to the entrypoint of your application. This should include the needed polyfills automatically. If your babel config uses preset-env, this should also ensure only needed polyfills are included.
React version: 18.2.0
Next.js version: 13.0.1
TypeScript version: 4.8.4
Rest Hooks version:
rest-hooks
6.4.2 and@rest-hooks/rest
5.2.0Package manager version: yarn 1.22.19
Node version: 16.16.0
Describe the bug
Hi,
On some old safari (14.1.2), I encounter this runtime error: Object.hasOwn is not a function (from NetworkManager.js), which I think comes from this commit bdbc6a4. I'm also not sure why this problem exists since it's supposed to be handled by some transcompiler.
I know Object.hasOwn is too new for safari v14.1, but I'm looking for a solution without upgrading the browser.
My tsconfig has
esnext
incompilerOptions.lib
and I've tried usingbabel-plugin-transform-object-hasown
but it didn't solve the problem.I've also tried to downgrade rest hooks to some versions earlier than the commit above (bdbc6a4), e.g.
rest-hooks 6.3.11
and@rest-hooks/rest 5.1.1
(or even older versions), but it seems that@rest-hooks/core 3.4.0
is always installed (in node_modules) and thus the problem still persists. (How can I install rest hooks without having the Object.hasOwn syntax inside? Maybe it could be one of the easiest solutions.)To Reproduce
The problem is from a private repo so I can't share it here. I'm using next.js v13 with ts v4.8. I think as long as Object.hasOwn is somewhere in the installed dependencies the error will be thrown.
Expected behavior
No this
Object.hasOwn
error on Safari v14.1.P.S. Thanks for this awesome project!
The text was updated successfully, but these errors were encountered: