diff --git a/src/OrchardCore.Build/Dependencies.props b/src/OrchardCore.Build/Dependencies.props index edcdd73261a..c5fe7b7983e 100644 --- a/src/OrchardCore.Build/Dependencies.props +++ b/src/OrchardCore.Build/Dependencies.props @@ -35,7 +35,7 @@ - + diff --git a/src/OrchardCore.Modules/OrchardCore.Shortcodes/Providers/LocaleShortcodeProvider.cs b/src/OrchardCore.Modules/OrchardCore.Shortcodes/Providers/LocaleShortcodeProvider.cs index 2793860d285..0cfe75a58c9 100644 --- a/src/OrchardCore.Modules/OrchardCore.Shortcodes/Providers/LocaleShortcodeProvider.cs +++ b/src/OrchardCore.Modules/OrchardCore.Shortcodes/Providers/LocaleShortcodeProvider.cs @@ -9,6 +9,7 @@ public class LocaleShortcodeProvider : IShortcodeProvider { public const string ShortCodeIdentifier = "locale"; + private static readonly ValueTask Empty = new ValueTask(String.Empty); private static readonly ValueTask Null = new ValueTask((string)null); public ValueTask EvaluateAsync(string identifier, Arguments arguments, string content, Context context) @@ -21,7 +22,7 @@ public ValueTask EvaluateAsync(string identifier, Arguments arguments, s var language = arguments.NamedOrDefault("lang")?.ToLower(); var argFallback = arguments.NamedOrAt("fallback", 1); // default value of true for the fallback argument - var fallback = argFallback == null ? true : Convert.ToBoolean(argFallback); ; + var fallback = argFallback == null ? true : Convert.ToBoolean(argFallback); var currentCulture = CultureInfo.CurrentUICulture; if (fallback) @@ -46,7 +47,7 @@ public ValueTask EvaluateAsync(string identifier, Arguments arguments, s } } - return Null; + return Empty; } } }