Permalink
Browse files

Adjust for removal of IDBDatabaseException in Firefox nightlies.

  • Loading branch information...
1 parent c88f8b4 commit bd27efd08629d9af15ff0b7ecde7cd1f28dfa230 @jdm jdm committed Apr 15, 2012
Showing with 7 additions and 1 deletion.
  1. +7 −1 IDBStore.js
View
@@ -87,7 +87,13 @@
}
openRequest.onerror = hitch(this, function(error){
- if(error.target.errorCode == 12){ // TODO: Use const
+ var gotVersionErr = false;
+ if('error' in error.target) {
+ gotVersionErr = error.target.error.name == "VersionError";
+ } else if('errorCode' in error.target) {
+ gotVersionErr = error.target.errorCode == 12; // TODO: Use const
+ }
+ if(gotVersionErr){
this.dbVersion++;
setTimeout(hitch(this, 'openDB'));
}else{

0 comments on commit bd27efd

Please sign in to comment.