sort returns compare value and not bool
This commit is contained in:
@@ -229,7 +229,9 @@ angular.module('Application').controller('SystemController', ['$scope', '$locati
|
||||
usageOther -= tmp;
|
||||
});
|
||||
|
||||
if ($scope.disks.disks[0] === disk) { // the root mount point is the first disk
|
||||
disk.contains.sort(function (x, y) { return y.usage - x.usage; }); // sort by usage
|
||||
|
||||
if ($scope.disks.disks[0] === disk) { // the root mount point is the first disk. keep this 'contains' in the end
|
||||
disk.contains.push({
|
||||
label: 'Everything else (Ubuntu, Swap, etc)',
|
||||
id: 'other',
|
||||
@@ -238,8 +240,6 @@ angular.module('Application').controller('SystemController', ['$scope', '$locati
|
||||
});
|
||||
}
|
||||
|
||||
disk.contains.sort(function (x, y) { return x.usage > y.usage; }); // sort by usage
|
||||
|
||||
iteratorCallback();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user