History

Reset IndexedDB when resetting the app

Thibaut committed 11 years ago

Commit 9cc6dc91 parent 25f844d2 files · +4 −0Browse files

Showing the changes to assets/javascripts (2 of 2 files). Show all

Unified · Split

2 files
  1. assets/javascripts/app/app.coffee +1 −0
  2. assets/javascripts/app/db.coffee +3 −0
assets/javascripts/app/app.coffee+1−0
@@ -110,6 +110,7 @@ · 109 unmodified lines
110 reset: ->110 reset: ->
111 @store.clear()111 @store.clear()
112 @settings.reset()112 @settings.reset()
113 @db.reset()
113 @appCache?.update()114 @appCache?.update()
114 window.location = '/'115 window.location = '/'
115 return116 return
assets/javascripts/app/db.coffee+3−0
@@ -108,6 +108,9 @@ class app.DB · 107 unmodified lines
108 108
109 txn109 txn
110 110
111 reset: ->
112 try indexedDB?.deleteDatabase(NAME) catch
113
111 useIndexedDB: ->114 useIndexedDB: ->
112 !app.isSingleDoc() and !!window.indexedDB115 !app.isSingleDoc() and !!window.indexedDB
113 116