If state.garrisonHolder is undefined (e.g. ungarrisoning with a storehouse in the selection) this throws a warning:
WARNING: JavaScript warning: gui/session/selection_panels_helpers.js line 373 reference to undefined property state.garrisonHolder
Differential D1326
Double negate state.garrisonHolder temple on Feb 23 2018, 8:56 PM. Authored by
Details
If state.garrisonHolder is undefined (e.g. ungarrisoning with a storehouse in the selection) this throws a warning: WARNING: JavaScript warning: gui/session/selection_panels_helpers.js line 373 reference to undefined property state.garrisonHolder Agree.
Diff Detail
Event TimelineComment Actions Successful build - Chance fights ever on the side of the prudent. Linter detected issues: Executing section Default... Executing section Source... Executing section JS... | | [NORMAL] ESLintBear (curly): | | Unnecessary { after 'for-of'. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/selection_panels_helpers.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/selection_panels_helpers.js | 414| 414| let otherEnts = []; | 415| 415| | 416| 416| for (let ent of garrisonHolders) | 417| |- { | | 417|+ | 418| 418| if (controlsPlayer(GetEntityState(ent).player)) | 419| 419| ownEnts.push(ent); | 420| 420| else | 421| 421| otherEnts.push(ent); | 422| |- } | | 422|+ | 423| 423| | 424| 424| if (ownEnts.length) | 425| 425| Engine.PostNetworkCommand({ Link to build: https://jenkins.wildfiregames.com/job/differential/79/display/redirect |