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 Feb 23, 2023
1 parent be99c8a commit 1a045c8
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 @@ -112,7 +112,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 @@ -385,6 +385,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 ||
this.is_dynamic_element ||
component.compile_options.dev
Expand Down
4 changes: 1 addition & 3 deletions src/compiler/compile/render_ssr/handlers/Element.ts
Expand Up @@ -162,9 +162,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 1a045c8

Please sign in to comment.