mirror of
https://github.com/apache/cordova-android.git
synced 2025-02-20 23:56:20 +08:00
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.
This commit is contained in:
parent
935295c9b8
commit
b3e9794189
@ -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();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user