Invalid Operation on home page
thedocbwarren opened this issue · 5 comments
The profile page on startup checks for a user id in the url. When none is available the promise api for getUser fails with a JSON.parse error:
Invalid operation SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data
its in api.js
line 69
Can fix via checking the id presence in ProfileComponent.jsx in the componentDidMount event
Question is, is this an intended state to error on start?
@thedocbwarren which branch is this on, not seeing this on react-meal-tally you may need to pull it
this is also intended state when user logs in their id is in the url then profile components loads and uses that id to get the user's info to populate profile. Allows for user to refresh on profile page as well as long as the session has not been restarted in the server I believe.
@thedocbwarren is this when user first signs on the refreshes the page? I keep getting this error
closing issue as I do not see it happening on the latest build.