diff options
author | Sergey Chebotar <s.chebotar@gmail.com> | 2021-12-05 15:35:43 +0300 |
---|---|---|
committer | Sergey Chebotar <s.chebotar@gmail.com> | 2021-12-05 15:35:43 +0300 |
commit | 56a2cb501543fa58c2c2f837d53e8f3b5d0bcac7 (patch) | |
tree | 01b46beff8ffcdf566985727bc60a91650931241 /Source | |
parent | 5f4d421326518f7e79a832500c742551fc3643ac (diff) |
Fix null response failure
Diffstat (limited to 'Source')
-rw-r--r-- | Source/Assistant/SkuAssist.cs | 3 |
1 files changed, 3 insertions, 0 deletions
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<StoreResponce>(json); IProduct product = storeResponse .Ecommerce |