Skip to content

Commit

Permalink
add comment tag only when hydratable
Browse files Browse the repository at this point in the history
  • Loading branch information
tanhauhau committed Feb 22, 2020
1 parent 4590b86 commit 98d58e0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/compiler/compile/render_ssr/handlers/HtmlTag.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import Renderer, { RenderOptions } from '../Renderer';
import RawMustacheTag from '../../nodes/RawMustacheTag';

export default function(node: RawMustacheTag, renderer: Renderer, _options: RenderOptions) {
renderer.add_string('<!-- HTML_TAG_START -->');
export default function(node: RawMustacheTag, renderer: Renderer, options: RenderOptions) {
if (options.hydratable) renderer.add_string('<!-- HTML_TAG_START -->');
renderer.add_expression(node.expression.node);
renderer.add_string('<!-- HTML_TAG_END -->');
if (options.hydratable) renderer.add_string('<!-- HTML_TAG_END -->');
}

0 comments on commit 98d58e0

Please sign in to comment.