diff --git a/Plugins/Flow.Launcher.Plugin.Url/Converters/InverseBoolConverter.cs b/Plugins/Flow.Launcher.Plugin.Url/Converters/InverseBoolConverter.cs index 3f75c07eb..c46d416a8 100644 --- a/Plugins/Flow.Launcher.Plugin.Url/Converters/InverseBoolConverter.cs +++ b/Plugins/Flow.Launcher.Plugin.Url/Converters/InverseBoolConverter.cs @@ -9,14 +9,17 @@ public class InverseBoolConverter : IValueConverter { public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { - if (targetType != typeof(bool)) - throw new InvalidOperationException("The target must be a boolean"); + if (value is not bool) + throw new ArgumentException("value should be boolean", nameof(value)); return !(bool)value; } public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) { - throw new NotSupportedException(); + if (value is not bool) + throw new ArgumentException("value should be boolean", nameof(value)); + + return !(bool)value; } }