diff --git a/packages/fxa-settings/src/components/Settings/ConnectedServices/index.test.tsx b/packages/fxa-settings/src/components/Settings/ConnectedServices/index.test.tsx index 2193ab2f71..373a2a5898 100644 --- a/packages/fxa-settings/src/components/Settings/ConnectedServices/index.test.tsx +++ b/packages/fxa-settings/src/components/Settings/ConnectedServices/index.test.tsx @@ -124,6 +124,11 @@ describe('Connected Services', () => { sortedAndUniqueClients.filter((item) => item.name === 'Mozilla Monitor') .length ).toEqual(1); + expect( + sortedAndUniqueClients.filter( + (item) => item.name === 'Mozilla Monitor' + )[0].lastAccessTime + ).toEqual(1570736983000); expect(groupedByName['Mozilla Monitor'].length).toEqual(2); }); diff --git a/packages/fxa-settings/src/components/Settings/ConnectedServices/index.tsx b/packages/fxa-settings/src/components/Settings/ConnectedServices/index.tsx index 6b27b7c39d..3ebc1b76c3 100644 --- a/packages/fxa-settings/src/components/Settings/ConnectedServices/index.tsx +++ b/packages/fxa-settings/src/components/Settings/ConnectedServices/index.tsx @@ -34,7 +34,7 @@ export function sortAndFilterConnectedClients( .map((key) => { return groupedByName[key].sort( (a: AttachedClient, b: AttachedClient) => - a.lastAccessTime - b.lastAccessTime + b.lastAccessTime - a.lastAccessTime )[0]; }) .sort((a, b) => b.lastAccessTime - a.lastAccessTime);