Fix missing types logic.

missingTypes.length was greater than zero so the only way it can be
zero immediately afterwards is if splice is called so move the zero
check after the splice.

Despite what istanbul reports this function is covered by the tests.
This commit is contained in:
Mark Hindess 2014-07-31 08:36:54 +01:00
parent 30a94bdaf5
commit 2f882913f0
1 changed files with 3 additions and 3 deletions

View File

@ -34,9 +34,9 @@ events.on('type-registered',function(type) {
if (i != -1) {
missingTypes.splice(i,1);
util.log("[red] Missing type registered: "+type);
}
if (missingTypes.length === 0) {
parseConfig();
if (missingTypes.length === 0) {
parseConfig();
}
}
}
});