From 226e27278738e982ec925b256cced4b57a55f811 Mon Sep 17 00:00:00 2001 From: Jesse Stam Date: Thu, 23 Jun 2022 09:31:05 +0200 Subject: [PATCH] Added simple check to see if there is text. Add this so we don't add a new line we don't need. --- .../Plugins/UniTask/Runtime/UnityWebRequestException.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/UniTask/Assets/Plugins/UniTask/Runtime/UnityWebRequestException.cs b/src/UniTask/Assets/Plugins/UniTask/Runtime/UnityWebRequestException.cs index d2a37ce..9585769 100644 --- a/src/UniTask/Assets/Plugins/UniTask/Runtime/UnityWebRequestException.cs +++ b/src/UniTask/Assets/Plugins/UniTask/Runtime/UnityWebRequestException.cs @@ -1,4 +1,4 @@ -#if ENABLE_UNITYWEBREQUEST && (!UNITY_2019_1_OR_NEWER || UNITASK_WEBREQUEST_SUPPORT) +#if ENABLE_UNITYWEBREQUEST && (!UNITY_2019_1_OR_NEWER || UNITASK_WEBREQUEST_SUPPORT) using System; using System.Collections.Generic; @@ -49,7 +49,7 @@ namespace Cysharp.Threading.Tasks { if (msg == null) { - if (Text != null) + if(!string.IsNullOrWhiteSpace(Text)) { msg = Error + Environment.NewLine + Text; }