mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-02-23 19:49:43 +01:00
[PTRun] Unnecessary null check is removed.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user