[fix] filter undefined values before resolving