Skip to content

Commit 2a6b7fd

Browse files
committed
ref. pull/3046#discussion_r119968651
1 parent f10b1d0 commit 2a6b7fd

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

RetailCoder.VBE/UI/Command/MenuItems/ParentMenus/ParentMenuItemBase.cs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ protected ParentMenuItemBase(string key, IEnumerable<IMenuItem> items, int? befo
2626
public ICommandBarControls Parent { get; set; }
2727
public ICommandBarPopup Item { get; private set; }
2828

29-
public string Key => Item == null ? null : Item.Tag;
29+
public string Key => Item?.Tag;
3030

3131
public Func<string> Caption { get { return () => Key == null ? null : RubberduckUI.ResourceManager.GetString(Key, Settings.Settings.Culture); } }
3232

@@ -62,10 +62,7 @@ public void Localize()
6262
}
6363

6464
var childMenu = kvp.Key as ParentMenuItemBase;
65-
if (childMenu != null)
66-
{
67-
childMenu.Localize();
68-
}
65+
childMenu?.Localize();
6966
}
7067
}
7168

0 commit comments

Comments
 (0)