mirror of
https://github.com/bitwarden/browser
synced 2025-12-11 13:53:34 +00:00
sort fixes when never used
This commit is contained in:
@@ -501,13 +501,20 @@ function initLoginService() {
|
||||
var aLastUsed = a.localData && a.localData.lastUsedDate ? a.localData.lastUsedDate : null;
|
||||
var bLastUsed = b.localData && b.localData.lastUsedDate ? b.localData.lastUsedDate : null;
|
||||
|
||||
if (aLastUsed && (!bLastUsed || aLastUsed < bLastUsed)) {
|
||||
if (aLastUsed && bLastUsed && aLastUsed < bLastUsed) {
|
||||
return 1;
|
||||
}
|
||||
if (bLastUsed && (!aLastUsed || aLastUsed > bLastUsed)) {
|
||||
if (aLastUsed && !bLastUsed) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (bLastUsed && aLastUsed && aLastUsed > bLastUsed) {
|
||||
return -1;
|
||||
}
|
||||
if (bLastUsed && !aLastUsed) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user