Browse Source

Wrap app.DB#useIndexedDB in try/catch

Thibaut 11 years ago
parent
commit
eecbade78e
1 changed files with 4 additions and 1 deletions
  1. 4 1
      assets/javascripts/app/db.coffee

+ 4 - 1
assets/javascripts/app/db.coffee

@@ -221,7 +221,10 @@ class app.DB
     return
 
   useIndexedDB: ->
-    !app.isSingleDoc() and !!window.indexedDB
+    try
+      !app.isSingleDoc() and !!window.indexedDB
+    catch
+      false
 
   indexedDBVersion: ->
     if app.config.env is 'production' then app.config.version else Date.now() / 1000