I have a factory that calls localStorageService.cookie.clearAll() which throws an error of `TypeError: Cannot read property 'split' of undefined`. It turns out that this error is caused by $document having document be in `$document[0]`. The proposed update solves my issue; thanks!
commit 8beff969457285fb85d10ca96205a3dc7a3d729f
Author: George Bonner <georgebonnr@gmail.com>
Date: Mon May 12 16:31:42 2014 -0700
typo fix
commit 8ba0a658b5e1831dfd3b8299327a2be50ecec0f2
Author: George Bonner <georgebonnr@gmail.com>
Date: Mon May 12 16:19:35 2014 -0700
Fix
commit 5d9c6c5afd4b9a56a03522e644c01d41c2a344eb
Author: George Bonner <georgebonnr@gmail.com>
Date: Mon May 12 15:58:48 2014 -0700
fix unhandled errors in chrome
$window[storageType] would throw unhandled error in Chrome some cases as browserSupportsLocalStorage() had not yet been called.
with the prefix -- supporting deterministic internal operation and
loosely coupled white box testing
- Adds tests for remove, deriveKey, and key replacement
- Splits the add tests into 3 scenerios -- add JSON, add string, and add
integer
- Remove the test stubs for get, set, and clearAll to properly test the
underlying methods
When trying to remove a cookie I noticed that the cookie wasn't being removed. Upon further inspection I saw that the function was relying on the local "cookie" variable which wasn't copied across from the initialization code. Same seems to be true for "notify".
Cookies can now be removed happily.