Skip to content

Commit 2a34195

Browse files
authored
Merge pull request #64 from contentstack:feat/DX-1240-Live-Preview-2.0
fix: check for LivePreviewConfig Host only when its enabled
2 parents a75edf3 + 768baf1 commit 2a34195

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Contentstack.Core/ContentstackClient.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,10 +118,9 @@ public ContentstackClient(IOptions<ContentstackOptions> options)
118118
this.LivePreviewConfig = new LivePreviewConfig()
119119
{
120120
Enable = false,
121-
122121
};
123122
}
124-
if (this.LivePreviewConfig.Host == null)
123+
if (this.LivePreviewConfig.Host == null && this.LivePreviewConfig.Enable)
125124
{
126125
if (this.LivePreviewConfig.ManagementToken != null)
127126
{

0 commit comments

Comments
 (0)