mirror of
https://github.com/Prowlarr/Prowlarr
synced 2025-12-08 17:42:47 +01:00
Fixed: (Cardigann) Fallback variables to empty string to prevent NullRef
This commit is contained in:
parent
9869c2272a
commit
add2988789
1 changed files with 1 additions and 1 deletions
|
|
@ -374,7 +374,7 @@ public string ApplyGoTemplateText(string template, Dictionary<string, object> va
|
|||
var newvalue = reReplaceRegexMatches.Groups[3].Value;
|
||||
|
||||
var replaceRegex = new Regex(regexp);
|
||||
var input = (string)variables[variable];
|
||||
var input = (string)variables[variable] ?? string.Empty;
|
||||
var expanded = replaceRegex.Replace(input, newvalue);
|
||||
|
||||
if (modifier != null)
|
||||
|
|
|
|||
Loading…
Reference in a new issue