From 56a2cb501543fa58c2c2f837d53e8f3b5d0bcac7 Mon Sep 17 00:00:00 2001 From: Sergey Chebotar Date: Sun, 5 Dec 2021 15:35:43 +0300 Subject: [PATCH] Fix null response failure --- Source/Assistant/SkuAssist.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Source/Assistant/SkuAssist.cs b/Source/Assistant/SkuAssist.cs index 69c1a81..83f7d1d 100644 --- a/Source/Assistant/SkuAssist.cs +++ b/Source/Assistant/SkuAssist.cs @@ -48,6 +48,9 @@ namespace Rehau.Sku.Assist .Substring(script.IndexOf("push(") + 5) .TrimEnd(new[] { ')', ';', '\n', ' ' }); + if (!json.Contains("impressions")) + return null; + StoreResponce storeResponse = JsonConvert.DeserializeObject(json); IProduct product = storeResponse .Ecommerce