GitHub user sebbASF opened an issue:
https://github.com/apache/incubator-ponymail/issues/194
Bug: confusion of storageAvailable and localStorage in ponymail.js
The storageAvailable boolean is true if typeof(window.sessionStorage) !==
"undefined".
However the code repeatedly performs checks like the following:
if (storageAvailable) {
if (typeof(window.localStorage) !== "undefined") {
Either storageAvailable implies window.localStorage is usable, in which
case checking it is redundant, or the check of storageAvailable is redundant.
In any case, judging by the code used to initialise the storageAvailable
variable, code that checks window.localStorage needs to allow for an exception
to occur.
Further, rather than keep checking typeof(window.localStorage), it would be
more efficient to set up a global variable.
----
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---