Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
Require.modules["app/ui/dashboard"] = function(exports, require) {
var $ = require("jQuery");
var cache = require("cache");
var dateUtils = require("date-utils");
var bugzilla = require("bugzilla");
var window = require("window");
var xhrQueue = require("xhr/queue").create();
function sortByLastChanged(bugs) {
var lctimes = {};
bugs.forEach(
function(bug) {
lctimes[bug.id] = dateUtils.dateFromISO8601(bug.last_change_time);
});
function compare(a, b) {
var alc = lctimes[a.id];
var blc = lctimes[b.id];
if (alc < blc)
return -1;
if (alc > blc)