From f3334145e1eb7a0faee900b04615ecce76abdefd Mon Sep 17 00:00:00 2001 From: Gokce Kantarci Date: Tue, 26 Dec 2023 17:43:25 +0300 Subject: [PATCH] [PTRun] Unnecessary null check is removed. --- .../launcher/Wox.Infrastructure/Storage/JsonStorage`1.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/launcher/Wox.Infrastructure/Storage/JsonStorage`1.cs b/src/modules/launcher/Wox.Infrastructure/Storage/JsonStorage`1.cs index ceee23c733..ad2f68fa83 100644 --- a/src/modules/launcher/Wox.Infrastructure/Storage/JsonStorage`1.cs +++ b/src/modules/launcher/Wox.Infrastructure/Storage/JsonStorage`1.cs @@ -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; }