A Swiss Army knife for developers.
C# blazorcross-platformcsharpdesktopdesktop-appdesktop-applicationdeveloper-toolsextensiblefluentfluent-designlinuxmacosmicasyntax-highlightingtypescriptwindowswindows-10windows-11winui
added null check on empty document on copy button click (#17)
BenjaminTae979656d61c
diff --git a/src/dev/impl/DevToys/UI/Controls/FormattedTextBlock/FormattedTextBlock.xaml.cs b/src/dev/impl/DevToys/UI/Controls/FormattedTextBlock/FormattedTextBlock.xaml.csindex 88b67b410..aa6343dc1 100644--- a/src/dev/impl/DevToys/UI/Controls/FormattedTextBlock/FormattedTextBlock.xaml.cs+++ b/src/dev/impl/DevToys/UI/Controls/FormattedTextBlock/FormattedTextBlock.xaml.cs@@ -522,6 +522,11 @@ namespace DevToys.UI.Controls.FormattedTextBlockprivate void CopyButton_Click(object sender, RoutedEventArgs e){+ if (string.IsNullOrWhiteSpace(_document))+ {+ return;+ }+var data = new DataPackage{RequestedOperation = DataPackageOperation.Copy