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

Unexpected error only on some computers #33

Closed
j4ysen opened this issue Jul 28, 2021 · 5 comments
Closed

Unexpected error only on some computers #33

j4ysen opened this issue Jul 28, 2021 · 5 comments

Comments

@j4ysen
Copy link

j4ysen commented Jul 28, 2021

Hey guys,

I'm getting an error consistently on some computers, and I'm unable to replicate the issue on my local machine. Does anyone know why this would happen?

Wondering if anyone else gets the same issue? Check out the site here

image

@ndimatteo
Copy link
Owner

Hey there @j4ysen!

I'm guessing the storeURL is not set properly in Sanity, and therefore it's failing at this line: https://github.com/ndimatteo/HULL/blob/main/components/cart.js#L52-L53

That's the only place where we use that variable, so if you can run some checks there, might provide some insight!

@j4ysen
Copy link
Author

j4ysen commented Jul 28, 2021

Thanks for the quick reply Nick! I've done some checks and there's no reason why that would be undefined (since everything is properly defined in sanity). It works fine on new browsers, but on safari 12 for example it doesn't work. I'll do some more research and post here if I find out anything new.

@j4ysen
Copy link
Author

j4ysen commented Jul 29, 2021

Did some research on a virtual machine of safari 12, and it seems that the 'data' put into cart comes up as empty

image
image

Is there any reason this might be the case on certain browsers?
Also seeing a lot of 404s, especially on the build manifest...

@ndimatteo
Copy link
Owner

I'm wondering if this is a bug with Safari 12, perhaps with how we destructure the data object for the Cart component here: https://github.com/ndimatteo/HULL/blob/main/components/cart.js#L19-L20

Can you try adding:

if (!data) return null

...above the destructuring to see if that helps?

@ndimatteo
Copy link
Owner

Closing due to inactivity, feel free to re-open if you have more details about the issue 🤘

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