Bug 622238 - In tests: JavaScript Warning: "assignment to undeclared variable item" {file: "chrome://browser/content/tabview.js" line: 7374} [r=dao, a=beltzner]

This commit is contained in:
Michael Yoshitaka Erlewine 2011-01-12 10:15:26 -05:00
parent 57669f34ef
commit ee1cd30325

View File

@ -858,16 +858,15 @@ let UI = {
getClosestTab: function UI_getClosestTab(tabCenter) {
let cl = null;
let clDist;
for each(item in TabItems.getItems()) {
if (item.parent && item.parent.hidden) {
continue;
}
TabItems.getItems().forEach(function (item) {
if (item.parent && item.parent.hidden)
return;
let testDist = tabCenter.distance(item.bounds.center());
if (cl==null || testDist < clDist) {
cl = item;
clDist = testDist;
}
}
});
return cl;
},