Skip to content

Commit

Permalink
feat: post rebase cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
tanhauhau committed Oct 5, 2022
1 parent 68320d3 commit df216ee
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/compiler/compile/Component.ts
Expand Up @@ -107,7 +107,7 @@ export default class Component {
slots: Map<string, Slot> = new Map();
slot_outlets: Set<string> = new Set();

tags: Tag[] = []
tags: Tag[] = [];

constructor(
ast: Ast,
Expand Down
1 change: 1 addition & 0 deletions src/compiler/compile/nodes/Element.ts
Expand Up @@ -379,6 +379,7 @@ export default class Element extends Node {
this.handlers.length > 0 ||
this.styles.length > 0 ||
this.name === 'option' ||
this.is_dynamic_element ||
this.tag_expr.dynamic_dependencies().length ||
component.compile_options.dev
) {
Expand Down
4 changes: 1 addition & 3 deletions src/compiler/compile/render_ssr/handlers/Element.ts
Expand Up @@ -159,9 +159,7 @@ export default function (node: Element, renderer: Renderer, options: RenderOptio
});

if (options.hydratable) {
if (options.head_id) {
renderer.add_string(` data-svelte="${options.head_id}"`);
} else if (node.children.length === 1 && node.children[0].type === 'RawMustacheTag') {
if (node.children.length === 1 && node.children[0].type === 'RawMustacheTag') {
renderer.add_string(` data-svelte="${hash(JSON.stringify(node.children[0].expression.node))}"`);
options = { ...options, optimised_html_hydration: true };
} else if (node.can_optimise_to_html_string && !options.has_added_svelte_hash) {
Expand Down

0 comments on commit df216ee

Please sign in to comment.