fixed bug with upgrading from 1.0.x

This commit is contained in:
AJ ONeal 2012-03-03 13:04:29 -07:00
parent 6dba7f09f8
commit 16fb1c730e
2 changed files with 6 additions and 2 deletions

View File

@ -44,7 +44,11 @@
// the keys will shift all over the place
for (i = 0; i < w3cs.length; i += 1) {
key = w3cs.key(i);
val = w3cs.getItem(key);
try {
val = JSON.parse(w3cs.getItem(key));
} catch(e) {
return;
}
json[key] = val;
}
w3cs.clear();

View File

@ -3,7 +3,7 @@
"name": "json-storage",
"description": "A wrapper for storage engines which use the W3C Storage API",
"keywords": ["ender", "localStorage", "sessionStorage", "globalStorage", "Storage"],
"version": "1.1.0",
"version": "1.1.1",
"repository": {
"type": "git",
"url": "git://github.com/coolaj86/json-storage-js.git"