diff --git a/src/libs/PolicyUtils.ts b/src/libs/PolicyUtils.ts index 70f87a8c7373..5b916148c6ee 100644 --- a/src/libs/PolicyUtils.ts +++ b/src/libs/PolicyUtils.ts @@ -181,7 +181,9 @@ function getTagLists(policyTagList: OnyxEntry): Array policyTagListValue !== null); + return Object.values(policyTagList) + .filter((policyTagListValue) => policyTagListValue !== null) + .sort((tagA, tagB) => tagA.orderWeight - tagB.orderWeight); } /**