-
Notifications
You must be signed in to change notification settings - Fork 196
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
Added helpers to handle non-stringified values when parsing keys from localStorage #662
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have added some comments. Please go through them and let me know if you need any clarifications.
@sreeram-venkitesh Also, the title of the PR needs to be in the past tense. We don't follow imperative present tense in commit messages nor PR titles. I always give this reference to someone who starts new and is working with me: https://github.com/bigbinary/bigbinary-website/pull/781#pullrequestreview-677312016 PS: If we need to discuss or bring something to my attention or need my help, then the review comment can be left unresolved. |
@yedhink _r I have added the following changes as per your comments
I have added a reply in the comment about adding |
LGTM. One last thing, verify the following with this PR:
Once you've verified, you can assign me using The idea is that we assign the PR back if the merging of the PR now falls in the hand of someone else. Assigning to someone else means my assigned task has been done. For asking queries we don't assign, but rather mention. cc: @AbhayVAshokan @subins2000 @jagannathBhat @prasidhprabudhan You folks might've encountered a similar error while setting up wheel. Once this PR is merged to wheel, make sure you pull the latest from wheel. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Noticed this now. One more minor change is required.
@yedhink _a Changed the order of the return statement as mentioned in the review, in my last commit. I also tried the steps you mentioned and tried switching from granite to wheel. Once I started wheel's server, reloading the logged in granite page gave the home screen for wheel. This is the intended behaviour if we already have Please review the changes. Thank you. |
Fixes #661
Changes made
javascript/src/helpers/storage.js
, similar to what is done ingranite
getFromLocalStorage
method to check if existing value is JSON stringified. If not, the value is replaced withnull
.localStorage.setItem()
andlocalStorage.getItem()
withsetToLocalStorage()
andgetFromLocalStorage()
methods from the helper.@yedhink _a