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
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
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.
This is what my phone shows with chrome on an apple.
No problem. Apple
where you using safari?
I was
very odd, getting same thing in safari i get in chrome,
Thank you again.
No problem. Is the console logging any errors?
Oh wait, mobile
Wouldn't be able to check
Is any other data loading for you?
Yeah all the correct data load except those two
even other dates/tiimes
That's so weird.....is there a seperate api call or function that defines those dates and times?
nope same api for everything.
So it can load the weather but not the city name and date?
everything but current day and date in that section
That's insane 😂. Safari does have some web dev tools though that would allow you to see the console
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…
i think i found the issue, those are the only two parts using new Date()
Hmmmm
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
Still works for me 😂
thank you i fixed it