Permalink
Browse files

Fix for lighthouse ticket 115: certain versions of Android 2.2 return…

… "null" for window.openDatabase. Hook in PhoneGap fallback for storage in this case.
  • Loading branch information...
1 parent 935295c commit b3e9794189cb693e31c0b6bc8c723ff5aeeaaa07 @filmaj filmaj committed Mar 23, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 framework/assets/js/storage.js
@@ -382,7 +382,7 @@ var CupcakeLocalStorage = function() {
}
};
PhoneGap.addConstructor(function() {
- if (typeof window.openDatabase === "undefined") {
+ if (typeof window.openDatabase === "undefined" || window.openDatabase("test", "1.0", "TestDB", 1000) == null) {
navigator.openDatabase = window.openDatabase = DroidDB_openDatabase;
window.droiddb = new DroidDB();
}

0 comments on commit b3e9794

Please sign in to comment.