aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Api/PluginService.cs
diff options
context:
space:
mode:
authorBond_009 <bond.009@outlook.com>2020-04-15 11:09:14 +0200
committerBond_009 <bond.009@outlook.com>2020-04-15 11:09:14 +0200
commitfc049caba2ed4db499bd53a2e521550bc45b6ebe (patch)
tree95c4870cda0783f51dd8207a86fd5ae906054f77 /MediaBrowser.Api/PluginService.cs
parent9cca964b0880dc41792fe27ee03e69609ff2ac7e (diff)
parent2eb5775ee3fc0bd98f88e7208798dec4aa63c724 (diff)
Merge branch 'master' into nullable3
Diffstat (limited to 'MediaBrowser.Api/PluginService.cs')
-rw-r--r--MediaBrowser.Api/PluginService.cs4
1 files changed, 1 insertions, 3 deletions
diff --git a/MediaBrowser.Api/PluginService.cs b/MediaBrowser.Api/PluginService.cs
index 16d3268b9..7f74511ee 100644
--- a/MediaBrowser.Api/PluginService.cs
+++ b/MediaBrowser.Api/PluginService.cs
@@ -243,9 +243,7 @@ namespace MediaBrowser.Api
// https://code.google.com/p/servicestack/source/browse/trunk/Common/ServiceStack.Text/ServiceStack.Text/Controller/PathInfo.cs
var id = Guid.Parse(GetPathValue(1));
- var plugin = _appHost.Plugins.First(p => p.Id == id) as IHasPluginConfiguration;
-
- if (plugin == null)
+ if (!(_appHost.Plugins.First(p => p.Id == id) is IHasPluginConfiguration plugin))
{
throw new FileNotFoundException();
}