From c009dfb6fe55ed3ea88011a509bfe2acb2af96e1 Mon Sep 17 00:00:00 2001 From: Nadeem Patwekar Date: Fri, 11 Oct 2024 15:23:06 +0530 Subject: [PATCH] fix: check for LivePreviewConfig Host only when its enabled --- Contentstack.Core/ContentstackClient.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Contentstack.Core/ContentstackClient.cs b/Contentstack.Core/ContentstackClient.cs index f22ffb8..d8b949a 100644 --- a/Contentstack.Core/ContentstackClient.cs +++ b/Contentstack.Core/ContentstackClient.cs @@ -118,10 +118,9 @@ public ContentstackClient(IOptions options) this.LivePreviewConfig = new LivePreviewConfig() { Enable = false, - }; } - if (this.LivePreviewConfig.Host == null) + if (this.LivePreviewConfig.Host == null && this.LivePreviewConfig.Enable) { if (this.LivePreviewConfig.ManagementToken != null) {