Skip to content

Commit

Permalink
Literal render binding even in server mode
Browse files Browse the repository at this point in the history
For server-only mode, there is resource binding.
  • Loading branch information
exyi committed Dec 28, 2021
1 parent 7876247 commit 1a0d51b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Framework/Framework/Controls/Literal.cs
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ protected override void RenderControl(IHtmlWriter writer, IDotvvmRequestContext

// render Knockout data-bind
string? expression = null;
if (textBinding != null && !r.HtmlState.RenderOnServer(this))
if (textBinding != null)
{
expression = textBinding.GetKnockoutBindingExpression(this);
if (isFormattingRequired)
Expand All @@ -172,7 +172,7 @@ protected override void RenderControl(IHtmlWriter writer, IDotvvmRequestContext
writer.WriteKnockoutDataBindComment("text", expression);
}

if (expression == null)
if (expression == null || r.HtmlState.RenderOnServer(this))
{
string textToDisplay;
if (isFormattingRequired)
Expand Down

0 comments on commit 1a0d51b

Please sign in to comment.