Skip to content

Commit

Permalink
Merge pull request #13531 from Expensify/aldo_avoid-crash-empty-report
Browse files Browse the repository at this point in the history
Report can be a {}, improve check for emptyness/falsey
  • Loading branch information
MonilBhavsar authored Dec 12, 2022
2 parents 60cb033 + a464a5c commit 9101672
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libs/ReportUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ function getDefaultAvatar(login = '') {
* @returns {Array<*>}
*/
function getIcons(report, personalDetails, policies, defaultIcon = null) {
if (!report) {
if (_.isEmpty(report)) {
return [defaultIcon || getDefaultAvatar()];
}
if (isArchivedRoom(report)) {
Expand Down

0 comments on commit 9101672

Please sign in to comment.