mirror of
https://github.com/taobataoma/meanTorrent.git
synced 2026-07-05 06:09:12 +02:00
fixing removeMenuItem on menu service
Object menus had an unknown property menuItem that corresponded to link property (see addMenuItem).
This commit is contained in:
@@ -99,7 +99,7 @@ angular.module('core').service('Menus', [
|
||||
|
||||
// Search for menu item to remove
|
||||
for (var itemIndex in this.menus[menuId].items) {
|
||||
if (this.menus[menuId].items[itemIndex].menuItemURL === menuItemURL) {
|
||||
if (this.menus[menuId].items[itemIndex].link === menuItemURL) {
|
||||
this.menus[menuId].items.splice(itemIndex, 1);
|
||||
}
|
||||
}
|
||||
@@ -111,4 +111,4 @@ angular.module('core').service('Menus', [
|
||||
//Adding the topbar menu
|
||||
this.addMenu('topbar');
|
||||
}
|
||||
]);
|
||||
]);
|
||||
|
||||
Reference in New Issue
Block a user