Fixed a bug in the WizardSettingsModal being destroyed and still trying to do things.

This commit is contained in:
Nick Winter 2014-08-28 14:06:53 -07:00
parent f79a2848fd
commit 107a727d02

View file

@ -50,10 +50,11 @@ module.exports = class WizardSettingsModal extends ModalView
res.error =>
errors = JSON.parse(res.responseText)
console.warn 'Got errors saving user:', errors
return if @destroyed
forms.applyErrorsToForm(@$el, errors)
@disableModalInProgress(@$el)
res.success (model, response, options) =>
@hide()
@hide() unless @destroyed
@enableModalInProgress(@$el)