mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-24 08:08:15 -05:00
Simple fix for a race condition where the user schema might load after /auth/whoami, overwriting /auth/whoami's cookie.
This commit is contained in:
parent
2fa40fb2db
commit
2861f62248
1 changed files with 2 additions and 1 deletions
|
@ -22,7 +22,8 @@ class CocoModel extends Backbone.Model
|
||||||
if @constructor.schema?.loaded
|
if @constructor.schema?.loaded
|
||||||
@addSchemaDefaults()
|
@addSchemaDefaults()
|
||||||
else
|
else
|
||||||
@loadSchema()
|
{me} = require 'lib/auth'
|
||||||
|
@loadSchema() if me?.loaded
|
||||||
@once 'sync', @onLoaded, @
|
@once 'sync', @onLoaded, @
|
||||||
@saveBackup = _.debounce(@saveBackup, 500)
|
@saveBackup = _.debounce(@saveBackup, 500)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue