Try to find race condition.

This commit is contained in:
Martin Edenhofer 2012-10-23 23:09:00 +02:00
parent 4604c41195
commit c28406b0ac

View file

@ -89,6 +89,9 @@ class _Singleton
reset: (params) -> reset: (params) ->
console.log( 'reset', params ) console.log( 'reset', params )
# empty in-memory
App[ params.type ].refresh( [], { clear: true } )
# remove permanent storage # remove permanent storage
list = App.Store.list() list = App.Store.list()
for key in list for key in list
@ -96,9 +99,6 @@ class _Singleton
if parts[0] is 'collection' && parts[1] is params.type if parts[0] is 'collection' && parts[1] is params.type
App.Store.delete(key) App.Store.delete(key)
# empty in-memory
App[ params.type ].refresh( [], { clear: true } )
# load with new data # load with new data
@load(params) @load(params)