Explorar o código

Only check for buggy IndexedDB once

Thibaut %!s(int64=11) %!d(string=hai) anos
pai
achega
eb58c01ee5
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  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()