Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Object.hasOwn is not a function #48

Open
ChenBonBon opened this issue May 20, 2024 · 1 comment
Open

Object.hasOwn is not a function #48

ChenBonBon opened this issue May 20, 2024 · 1 comment

Comments

@ChenBonBon
Copy link

My project was written in solid-start with solid-meta

In my Macbook everything is ok, but when I open it on iPad, it will trigger this error in dev mode.

iPad os version is 14.7.1.

when I remove the solid-meta, everything is ok.

f7e195ed6b26495158f9df5a475ef623_720

@buymed-anhvu
Copy link

The Solid Meta has this line that use Object.hasOwn

if (Object.hasOwn(tagProps, "name") || Object.hasOwn(tagProps, "property")) {

According to https://caniuse.com/mdn-javascript_builtins_object_hasown, the function is not supported in Safari before version 15.4

So, to fix the issue temporarily, we can use a polyfill https://github.com/es-shims/Object.hasOwn

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants