Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
None
Description
Javascript for WP7 localStorage.getItem returns string 'undefined' when specified key exists and value is undefined. This scenario can be reproduced by adding some key/value to localStorage, then removing it.
The actual line in code in getItem function, which produce this behaviour, is:
retVal = window.unescape(decodeURIComponent(this._result));
The problem is that decodeURIComponent return string 'undefined' when input is undefined, and this should be fixed somehow like this:
retVal = this._result ? window.unescape(decodeURIComponent(this._result)) : this._result;