feat: post rebase cleanup

pull/7426/head
tanhauhau 4 years ago
parent c51ddcad18
commit 1ff6bb93b4

@ -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,

@ -449,6 +449,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

@ -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) {

Loading…
Cancel
Save