Shouldn't this be `if ( totalManifests !== uiFiles )` to be a proper check?