diff --git a/assets/javascripts/app/app.coffee b/assets/javascripts/app/app.coffee index 8e32a8b2..44ff84e1 100644 --- a/assets/javascripts/app/app.coffee +++ b/assets/javascripts/app/app.coffee @@ -110,6 +110,7 @@ reset: -> @store.clear() @settings.reset() + @db.reset() @appCache?.update() window.location = '/' return diff --git a/assets/javascripts/app/db.coffee b/assets/javascripts/app/db.coffee index e8f15612..37c01e7a 100644 --- a/assets/javascripts/app/db.coffee +++ b/assets/javascripts/app/db.coffee @@ -108,6 +108,9 @@ class app.DB txn + reset: -> + try indexedDB?.deleteDatabase(NAME) catch + useIndexedDB: -> !app.isSingleDoc() and !!window.indexedDB