From 2f7c5688ddd0d4145b91f5660f8f49df70081b28 Mon Sep 17 00:00:00 2001 From: Sergey Chebotar Date: Fri, 3 Dec 2021 13:24:31 +0300 Subject: [PATCH] Fix null return --- Source/ExcelDNA/Functions.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Source/ExcelDNA/Functions.cs b/Source/ExcelDNA/Functions.cs index db882c5..b348fc9 100644 --- a/Source/ExcelDNA/Functions.cs +++ b/Source/ExcelDNA/Functions.cs @@ -25,10 +25,16 @@ namespace Rehau.Sku.Assist { return "Загрузка..."; } + + else if (result == null) + { + return "Не найдено"; + } + else { MemoryCache.Default.Add(request, result, System.DateTime.Now.AddMinutes(10)); - return result == null ? "Не найдено" : result.ToString(); + return result.ToString(); } } }