History

Handle duplicate store error in onUpgradeNeeded

Thibaut Courouble committed 10 years ago

Commit 54a3ca01 parent 802600b1 file · +1 −1Browse files

Showing the changes to assets/javascripts (1 of 1 file). Show all

Unified · Split

assets/javascripts/app/db.coffee+1−1
@@ -65,7 +65,7 @@ class app.DB · 64 unmodified lines
65 db.createObjectStore('docs')65 db.createObjectStore('docs')
66 66
67 for doc in app.docs.all() when not $.arrayDelete(objectStoreNames, doc.slug)67 for doc in app.docs.all() when not $.arrayDelete(objectStoreNames, doc.slug)
68 db.createObjectStore(doc.slug)68 try db.createObjectStore(doc.slug)
69 69
70 for name in objectStoreNames70 for name in objectStoreNames
71 try db.deleteObjectStore(name)71 try db.deleteObjectStore(name)