Closed pablovezgz closed 7 years ago
Internet Explorer, when viewing local files using a file://
URI, will have window['localStorage'] == undefined
(due to policy?!).
So I affirm that the comparison against undefined
must be added. However, removing the comparison against null
triggers my paranoia. Why should we replace the current comparison? My guess is the comparison against undefined
should be added.
fixed in https://github.com/diveintomark/diveintohtml5/commit/0bbd404c088743963fd3e7f8f74923d1d09c0cf6
i just used the detect from modernizr for all the reasons. https://github.com/Modernizr/Modernizr/blob/d5f881a4de0d5fc1af85921ce9c7dc3919c6d335/feature-detects/storage/localstorage.js#L20-L49
In this section: http://diveintohtml5.info/storage.html#localstorage
The second operator at the first return statement always returns true. window['localStorage'] !== null; should be compared to undefined