Fix for issue #281 of phonegap/phonegap-android: Detect for localStorage if Java has disabled it

This commit is contained in:
macdonst 2011-11-23 03:39:27 +08:00
parent 36caaf366f
commit 63ae953432

View File

@ -431,7 +431,7 @@ PhoneGap.addConstructor(function() {
};
}
if (typeof window.localStorage === "undefined") {
if ((typeof window.localStorage == "undefined") || (window.localStorage == null)) {
navigator.localStorage = window.localStorage = new CupcakeLocalStorage();
PhoneGap.waitForInitialization("cupcakeStorage");
}