From 649f650da6550316e0e93dfd96b4041b9e543bb0 Mon Sep 17 00:00:00 2001 From: "nicolas.dorier" Date: Fri, 10 Sep 2021 00:08:38 +0900 Subject: [PATCH] Fix build --- BTCPayServer/Views/Invoice/PosData.cshtml | 36 +++++++++++------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/BTCPayServer/Views/Invoice/PosData.cshtml b/BTCPayServer/Views/Invoice/PosData.cshtml index 3b36c4d20..d305ba54d 100644 --- a/BTCPayServer/Views/Invoice/PosData.cshtml +++ b/BTCPayServer/Views/Invoice/PosData.cshtml @@ -1,41 +1,41 @@ @model (Dictionary Items, int Level) -@functions{ - async Task DisplayValue(object value) - { - if (value is string str && str.StartsWith("http")) - { - @str - } - else - { - @value - } - } -} - @foreach (var (key, value) in Model.Items) { - @if (value is string) + @if (value is string str) { if (!string.IsNullOrEmpty(key)) { } } else if (value is DictionarysubItems) { @* This is the array case *@ - if (subItems.Count == 1 && subItems.First().Value is string) + if (subItems.Count == 1 && subItems.First().Value is string str2) { } else
@key - @{ await DisplayValue(value); } + @if (str.StartsWith("http")) + { + @str + } + else + { + @value + } @key - @{ await DisplayValue(subItems.First().Value); } + @if (str2.StartsWith("http")) + { + @str2 + } + else + { + @subItems.First().Value + }