mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-23 11:56:00 +01:00
sort fixes when never used
This commit is contained in:
parent
518585cfb5
commit
e01f3fd40c
@ -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;
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user