1
0
forked from 0ad/0ad

Double negate state.garrisonHolder

Differential Revision: https://code.wildfiregames.com/D1326
Reviewed by: mimo
This was SVN commit r21355.
This commit is contained in:
temple 2018-02-24 14:13:27 +00:00
parent 7541291621
commit 79090bfa63

View File

@ -370,7 +370,7 @@ function unloadTemplate(template, owner)
// Filter out all entities that aren't garrisonable.
"garrisonHolders": g_Selection.toList().filter(ent => {
let state = GetEntityState(ent);
return state && state.garrisonHolder;
return state && !!state.garrisonHolder;
})
});
}
@ -404,7 +404,7 @@ function unloadAll()
{
let garrisonHolders = g_Selection.toList().filter(e => {
let state = GetEntityState(e);
return state && state.garrisonHolder;
return state && !!state.garrisonHolder;
});
if (!garrisonHolders.length)