History

Handle duplicate store error in onUpgradeNeeded

Thibaut Courouble committed 10 years ago

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

Unified · Split

assets/javascripts/app/db.coffee+1−1
@@ -65,7 +65,7 @@ class app.DB · 64 unmodified lines
6565 db.createObjectStore('docs')
6666
6767 for doc in app.docs.all() when not $.arrayDelete(objectStoreNames, doc.slug)
68− db.createObjectStore(doc.slug)
68+ try db.createObjectStore(doc.slug)
6969
7070 for name in objectStoreNames
7171 try db.deleteObjectStore(name)