[PTRun] Unnecessary null check is removed.

This commit is contained in:
Gokce Kantarci
2023-12-26 17:43:25 +03:00
parent 5b2bee71e2
commit f3334145e1

View File

@@ -290,8 +290,8 @@ namespace Wox.Infrastructure.Storage
{
JsonElement targetElement = root;
// If rootElement is not empty, try to get the specified property
if (!string.IsNullOrEmpty(rootElement) && root.TryGetProperty(rootElement, out var retrievedElement))
// Try to get the specified property
if (root.TryGetProperty(rootElement, out var retrievedElement))
{
targetElement = retrievedElement;
}