mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-28 01:55:38 -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
|
||||
@addSchemaDefaults()
|
||||
else
|
||||
@loadSchema()
|
||||
{me} = require 'lib/auth'
|
||||
@loadSchema() if me?.loaded
|
||||
@once 'sync', @onLoaded, @
|
||||
@saveBackup = _.debounce(@saveBackup, 500)
|
||||
|
||||
|
|
Loading…
Reference in a new issue