From eb58c01ee5d1052b68f8fda8ded4686e26e9261f Mon Sep 17 00:00:00 2001 From: Thibaut Date: Sat, 3 Jan 2015 18:22:12 -0500 Subject: [PATCH] Only check for buggy IndexedDB once --- assets/javascripts/app/db.coffee | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/assets/javascripts/app/db.coffee b/assets/javascripts/app/db.coffee index d01a9140..52bf1b64 100644 --- a/assets/javascripts/app/db.coffee +++ b/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()