Fix mod controller bug with fetching

Fix a bug in the ModController where it would ask the current
ModVersion to fetch itself even when there wasn't one selected.
This commit is contained in:
Andrew Miner
2015-01-18 11:21:11 -08:00
parent 28f762abe9
commit 0811a868af
@@ -39,7 +39,8 @@ module.exports = class ModController extends BaseController
onWillRender: ->
@model.fetch()
if @_storage? then @_storage.register "mod:#{@model.slug}", @model, 'activeVersion'
@model.on Event.change + ':activeModVersion', (mod, modVersion)=> modVersion.fetch()
@model.on Event.change + ':activeModVersion', (mod, modVersion)=>
if modVersion? then modVersion.fetch()
onDidRender: ->
@$enabled = @$('td:nth-child(1) input')