What would be the cause of data showing up as undefined & invalid on mobile only?

https://bsupinski.github.io/weather_app/ The webpage I am working on. Everything shows up fine on desktop PC. On mobile, the top right Day shows up as undefined and the date shows up as invalid. But the days and date show up else where just fine. They are all set dynamically. repo incase anyone is curious. https://github.com/bsupinski/weather_app The layout not even close to be doing done.
GitHub
GitHub - bsupinski/weather_app
Contribute to bsupinski/weather_app development by creating an account on GitHub.
20 Replies
croganm
croganm•2y ago
It worked for me on mobile Do you have location services turned off? That could cause it as you'd be getting undefined data back from the api
Errtu
Errtu•2y ago
Are you android or apple? I have location on, only two things that dont show are day and date in top right corner. If geolocation/location is turned off it should bring you to a manual enter location then load the weather from the data if it is valid. Also thank you for checking.
Errtu
Errtu•2y ago
This is what my phone shows with chrome on an apple.
croganm
croganm•2y ago
No problem. Apple
Errtu
Errtu•2y ago
where you using safari?
croganm
croganm•2y ago
I was
Errtu
Errtu•2y ago
very odd, getting same thing in safari i get in chrome, Thank you again.
croganm
croganm•2y ago
No problem. Is the console logging any errors? Oh wait, mobile Wouldn't be able to check Is any other data loading for you?
Errtu
Errtu•2y ago
Yeah all the correct data load except those two even other dates/tiimes
croganm
croganm•2y ago
That's so weird.....is there a seperate api call or function that defines those dates and times?
Errtu
Errtu•2y ago
nope same api for everything.
croganm
croganm•2y ago
So it can load the weather but not the city name and date?
Errtu
Errtu•2y ago
everything but current day and date in that section
croganm
croganm•2y ago
That's insane 😂. Safari does have some web dev tools though that would allow you to see the console
croganm
croganm•2y ago
App Store
‎Web Inspector
‎### Please refresh the page if you tap the "i" button and nothing happens ### Web Inspector expands Mobile Safari with a set of web development tools: DOM: View, inspect, edit, and search the elements that make up the DOM of a webpage. Elements: See the details about the webpage’s nodes and style…
Errtu
Errtu•2y ago
i think i found the issue, those are the only two parts using new Date()
croganm
croganm•2y ago
Hmmmm
Errtu
Errtu•2y ago
It is very sloppy being my first real project, I did that dat/date different from others without noticing. I just swapped them to same format. WIll see if it fixed
croganm
croganm•2y ago
Still works for me 😂
Errtu
Errtu•2y ago
thank you i fixed it
Want results from more Discord servers?
Add your server