Don't collect results from Menu::_callMenuWillShow

This commit is contained in:
Kevin Sawicki 2016-03-10 13:29:57 -08:00
parent 93939089ec
commit 3a08aa37de

View file

@ -249,19 +249,14 @@ Menu.prototype.insert = function(pos, item) {
// Force menuWillShow to be called // Force menuWillShow to be called
Menu.prototype._callMenuWillShow = function() { Menu.prototype._callMenuWillShow = function() {
var item, j, len, ref1, ref2, results; if (this.delegate != null) {
if ((ref1 = this.delegate) != null) { this.delegate.menuWillShow();
ref1.menuWillShow();
} }
ref2 = this.items; this.items.forEach(function(item) {
results = [];
for (j = 0, len = ref2.length; j < len; j++) {
item = ref2[j];
if (item.submenu != null) { if (item.submenu != null) {
results.push(item.submenu._callMenuWillShow()); item.submenu._callMenuWillShow();
} }
} });
return results;
}; };
var applicationMenu = null; var applicationMenu = null;