Don't hang if a mod version file doesn't load
This commit is contained in:
@@ -25,8 +25,6 @@ module.exports = class ModPack extends BaseModel
|
|||||||
|
|
||||||
@on Event.change, => @_cache = {}
|
@on Event.change, => @_cache = {}
|
||||||
|
|
||||||
# Public Methods ###############################################################################
|
|
||||||
|
|
||||||
# Item Methods #################################################################################
|
# Item Methods #################################################################################
|
||||||
|
|
||||||
findItem: (itemSlug, options={})->
|
findItem: (itemSlug, options={})->
|
||||||
@@ -170,14 +168,12 @@ module.exports = class ModPack extends BaseModel
|
|||||||
# Private Methods ##############################################################################
|
# Private Methods ##############################################################################
|
||||||
|
|
||||||
_onModVersionLoaded: (modVersion)->
|
_onModVersionLoaded: (modVersion)->
|
||||||
stillLoading = false
|
working = true
|
||||||
foundLoaded = false
|
|
||||||
@eachMod (mod)->
|
@eachMod (mod)->
|
||||||
mod.eachModVersion (modVersion)->
|
mod.eachModVersion (modVersion)->
|
||||||
foundLoaded = foundLoaded or modVersion.isLoaded
|
working = working and (modVersion.isUnloaded or modVersion.isLoading)
|
||||||
stillLoading = stillLoading or modVersion.isLoading
|
|
||||||
|
|
||||||
return if not foundLoaded or stillLoading
|
return if working
|
||||||
|
|
||||||
@trigger Event.change, this
|
@trigger Event.change, this
|
||||||
@trigger Event.sync, this
|
@trigger Event.sync, this
|
||||||
|
|||||||
Reference in New Issue
Block a user