From 54a3ca0d8fb21dd4436b600fd2ff18d3685ef592 Mon Sep 17 00:00:00 2001 From: Thibaut Courouble Date: Sun, 28 Feb 2016 18:57:48 -0500 Subject: [PATCH] Handle duplicate store error in onUpgradeNeeded --- assets/javascripts/app/db.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/javascripts/app/db.coffee b/assets/javascripts/app/db.coffee index 3b72d075..c6129386 100644 --- a/assets/javascripts/app/db.coffee +++ b/assets/javascripts/app/db.coffee @@ -65,7 +65,7 @@ class app.DB db.createObjectStore('docs') for doc in app.docs.all() when not $.arrayDelete(objectStoreNames, doc.slug) - db.createObjectStore(doc.slug) + try db.createObjectStore(doc.slug) for name in objectStoreNames try db.deleteObjectStore(name)