We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 54ab6f7 commit 7f8b946Copy full SHA for 7f8b946
ResXManager.View/Tools/AddNewKeyCommand.cs
@@ -70,8 +70,9 @@ private void InternalExecute(DependencyObject parameter)
70
};
71
72
inputBox.TextChanged += (_, args) =>
73
- // ReSharper disable once PossibleNullReferenceException
74
- inputBox.IsInputValid = !string.IsNullOrWhiteSpace(args.Text) && !resourceFile.Entries.Any(entry => entry.Key.Equals(args.Text, StringComparison.OrdinalIgnoreCase));
+ inputBox.IsInputValid = !string.IsNullOrWhiteSpace(args?.Text)
+ && !resourceFile.Entries.Any(entry => entry.Key.Equals(args.Text, StringComparison.OrdinalIgnoreCase))
75
+ && !args.Text.Equals(resourceFile.BaseName, StringComparison.OrdinalIgnoreCase);
76
77
if (inputBox.ShowDialog() != true)
78
return;
0 commit comments