Skip to content

Commit e22a112

Browse files
committed
Fix refactoring and remove string.IsNullOrEmpty for AbsolutePath, because it's always '/'.
1 parent 43a2bb6 commit e22a112

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/OrchardCore/OrchardCore/Modules/ModularBackgroundService.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,7 @@ private static void SetBaseUrl(HttpContext context, string baseUrl)
443443

444444
// Set the PathBase only if it's not just "/". Otherwise, the original path base is kept, which may
445445
// contain the RequestUrlPrefix if any.
446-
if (!string.IsNullOrEmpty(uri.AbsolutePath) && uri.AbsolutePath != "/")
446+
if (uri.AbsolutePath != "/")
447447
{
448448
context.Request.PathBase = uri.AbsolutePath;
449449
}
@@ -453,5 +453,4 @@ private static void SetBaseUrl(HttpContext context, string baseUrl)
453453
context.Request.QueryString = new QueryString(uri.Query);
454454
}
455455
}
456-
}
457456
}

0 commit comments

Comments
 (0)