aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Server/Formatters/CssOutputFormatter.cs
diff options
context:
space:
mode:
authorJoshua M. Boniface <joshua@boniface.me>2020-11-15 14:35:34 -0500
committerGitHub <noreply@github.com>2020-11-15 14:35:34 -0500
commit2f426dfc97677deffb60420078b20a7f5f03977e (patch)
tree89772dd894e735d657522105a29884d2117a5bfa /Jellyfin.Server/Formatters/CssOutputFormatter.cs
parent7caf1662eca2ea8826f3277e8b9d5c8c782fd03d (diff)
parent056c44010b437b0f718cb10b1ed66a7f38d61874 (diff)
Merge pull request #4458 from crobibero/dotnet-5
Upgrade to Net5
Diffstat (limited to 'Jellyfin.Server/Formatters/CssOutputFormatter.cs')
-rw-r--r--Jellyfin.Server/Formatters/CssOutputFormatter.cs3
1 files changed, 2 insertions, 1 deletions
diff --git a/Jellyfin.Server/Formatters/CssOutputFormatter.cs b/Jellyfin.Server/Formatters/CssOutputFormatter.cs
index b3771b7fe..e8dd48e4e 100644
--- a/Jellyfin.Server/Formatters/CssOutputFormatter.cs
+++ b/Jellyfin.Server/Formatters/CssOutputFormatter.cs
@@ -30,7 +30,8 @@ namespace Jellyfin.Server.Formatters
/// <returns>Write stream task.</returns>
public override Task WriteResponseBodyAsync(OutputFormatterWriteContext context, Encoding selectedEncoding)
{
- return context.HttpContext.Response.WriteAsync(context.Object?.ToString());
+ var stringResponse = context.Object?.ToString();
+ return stringResponse == null ? Task.CompletedTask : context.HttpContext.Response.WriteAsync(stringResponse);
}
}
}