mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-04-27 14:33:59 -04:00
Fixed GameMenuModal sometimes defaulting a Python player back to JavaScript.
This commit is contained in:
parent
ea349cfa29
commit
9b29e9512f
2 changed files with 2 additions and 2 deletions
app/views
|
@ -11,7 +11,7 @@ module.exports = class OptionsView extends CocoView
|
|||
template: template
|
||||
aceConfig: {}
|
||||
defaultConfig:
|
||||
language: 'javascript'
|
||||
language: 'python'
|
||||
keyBindings: 'default'
|
||||
invisibles: false
|
||||
indentGuides: false
|
||||
|
|
|
@ -75,7 +75,7 @@ module.exports = class PlayLevelModal extends ModalView
|
|||
patchMe ||= not _.isEqual val, lastHeroConfig[key]
|
||||
sessionHeroConfig[key] = val
|
||||
lastHeroConfig[key] = val
|
||||
if (codeLanguage = @subviews.choose_hero_view.codeLanguage) and @subviews.choose_hero_view.codeLanguageChanged
|
||||
if (codeLanguage = @subviews.choose_hero_view.codeLanguage) and (@subviews.choose_hero_view.codeLanguageChanged or not me.get('aceConfig'))
|
||||
patchSession ||= codeLanguage isnt @options.session.get('codeLanguage')
|
||||
patchMe ||= codeLanguage isnt me.get('aceConfig')?.language
|
||||
@options.session.set 'codeLanguage', codeLanguage
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue