Closed kissge closed 8 years ago
cool! but what if to apply .toString() on defaultScreenName assignment instead?
That might be better! Should I squash the commit? (btw I also reported this as a bug to jQuery localStorage plugin repo)
Should I squash the commit?
if you don't mind. and of course I want new pull request from you to fix the issue finally.
$.localStorage.set
can interpret the second argument as a JSON string, so:This prevents users whose screen name consists only digits (like
@928
) from logging in because his/her screen name doesn't match with the stored user name (https://github.com/miguelfreitas/twister-html/blob/8394d8f0f22f7bf2305ca9326d23e003968512b9/js/twister_user.js#L31).By merging this pull request, the stored value is assured to be a string value, which fixes this problem.