gsklee/ngStorage — pull request #54 by dkleehammer (2014-06-24 16:49:07+00:00)
Title: Fix to catch JSON parsing when not needed

This pull request fixes a problem where angular.fromJson is attempting to parse all objects including primitive string, which was my case. Essentially, I run the code you had existing when attempting to read a value from storage, but I wrapped a try/catch around it to handle fromJson parsing error (SyntaxError oddly enough). I then attempt to access the same item, but without parsing; if all else fails, re-throw the error.