mirror of
https://github.com/electron/electron.git
synced 2026-01-25 23:38:18 -05:00
remove duplicated prop copying
This commit is contained in:
@@ -295,12 +295,6 @@ Menu.buildFromTemplate = function (template) {
|
||||
throw new TypeError('Invalid template for MenuItem')
|
||||
}
|
||||
menuItem = new MenuItem(item)
|
||||
for (key in item) {
|
||||
// Preserve extra fields specified by user
|
||||
if (!menuItem.hasOwnProperty(key)) {
|
||||
menuItem[key] = item[key]
|
||||
}
|
||||
}
|
||||
menu.append(menuItem)
|
||||
}
|
||||
return menu
|
||||
|
||||
Reference in New Issue
Block a user