Commit 20631849 by Kálmán Viktor

dashboard: fix vm search default ordering on index js

parent aae7b5c5
......@@ -241,10 +241,14 @@ function generateVmHTML(pk, name, fav) {
}
function compareVmByFav(a, b) {
if(a.fav)
if(a.fav && b.fav) {
return a.pk < b.pk ? -1 : 1;
}
if(a.fav) {
return -1;
}
else
return 1;
return a.pk < b.pk ? -1 : 1;
}
function addSliderMiscs() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment