Browse Source

Only check for buggy IndexedDB once

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

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

@@ -23,7 +23,9 @@ class app.DB
   onOpenSuccess: (event) =>
     try
       db = event.target.result
-      db.transaction(['docs', app.docs.all()[0].slug], 'readwrite').abort() # https://bugs.webkit.org/show_bug.cgi?id=136937
+      unless @checkedBuggyIDB
+        db.transaction(['docs', app.docs.all()[0].slug], 'readwrite').abort() # https://bugs.webkit.org/show_bug.cgi?id=136937
+        @checkedBuggyIDB = true
     catch
       try db.close()
       @onOpenError()