Since targets.length will never be zero, this if block can be removed.