Skip to content

Commit

Permalink
locaStorage is not touched directly in an IF block
Browse files Browse the repository at this point in the history
  • Loading branch information
andris9 committed May 26, 2010
1 parent 65f0b69 commit ccfcb98
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions jstorage.js
Expand Up @@ -152,13 +152,13 @@
*/
function _init(){
/* Check if browser supports localStorage */
if(window.localStorage){
if("localStorage" in window){
try {
_storage_service = window.localStorage;
} catch(E3) {/* Firefox fails when touching localStorage and cookies are disabled */}
}
/* Check if browser supports globalStorage */
else if(window.globalStorage){
else if("globalStorage" in window){
try {
_storage_service = window.globalStorage[window.location.hostname];
} catch(E4) {/* Firefox fails when touching localStorage and cookies are disabled */}
Expand Down Expand Up @@ -227,7 +227,7 @@

$.jStorage = {
/* Version number */
version: "0.1.4",
version: "0.1.4.1",

/**
* Sets a key's value.
Expand Down
2 changes: 1 addition & 1 deletion jstorage.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ccfcb98

Please sign in to comment.