aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Server/Formatters/CssOutputFormatter.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Jellyfin.Server/Formatters/CssOutputFormatter.cs')
-rw-r--r--Jellyfin.Server/Formatters/CssOutputFormatter.cs6
1 files changed, 3 insertions, 3 deletions
diff --git a/Jellyfin.Server/Formatters/CssOutputFormatter.cs b/Jellyfin.Server/Formatters/CssOutputFormatter.cs
index b3771b7fe..cfc9d1ad3 100644
--- a/Jellyfin.Server/Formatters/CssOutputFormatter.cs
+++ b/Jellyfin.Server/Formatters/CssOutputFormatter.cs
@@ -1,5 +1,4 @@
-using System;
-using System.Text;
+using System.Text;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc.Formatters;
@@ -30,7 +29,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);
}
}
}