[fix] remove unneeded if block