Removed race condition.
This commit is contained in:
parent
f12519364d
commit
25c3bc157d
2 changed files with 3 additions and 3 deletions
|
@ -88,7 +88,7 @@ class App.Auth
|
||||||
|
|
||||||
# refresh default collections
|
# refresh default collections
|
||||||
if data.collections
|
if data.collections
|
||||||
App.Event.trigger 'resetCollection', data.collections
|
App.Collection.resetCollections( data.collections )
|
||||||
|
|
||||||
# trigger auth ok with new session data
|
# trigger auth ok with new session data
|
||||||
App.Event.trigger( 'auth', data.session )
|
App.Event.trigger( 'auth', data.session )
|
||||||
|
|
|
@ -19,10 +19,10 @@ class App.Collection
|
||||||
_instance ?= new _collectionSingleton
|
_instance ?= new _collectionSingleton
|
||||||
_instance.reset( args )
|
_instance.reset( args )
|
||||||
|
|
||||||
@resetCollection: ( args ) ->
|
@resetCollections: ( args ) ->
|
||||||
if _instance == undefined
|
if _instance == undefined
|
||||||
_instance ?= new _collectionSingleton
|
_instance ?= new _collectionSingleton
|
||||||
_instance.resetCollection( args )
|
_instance.resetCollections( args )
|
||||||
|
|
||||||
class _collectionSingleton extends Spine.Module
|
class _collectionSingleton extends Spine.Module
|
||||||
@include App.LogInclude
|
@include App.LogInclude
|
||||||
|
|
Loading…
Reference in a new issue