[fix] Default to empty array as the function can return `undefined`