From 72c7f7a2c90147b90762865c6750f887e3defa15 Mon Sep 17 00:00:00 2001 From: Nguyen Tran Date: Tue, 25 Apr 2023 16:46:33 -0400 Subject: [PATCH] Typo fixes --- src/compiler/compile/nodes/SlotTemplate.ts | 2 +- .../compile/render_dom/wrappers/InlineComponent/index.ts | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/compiler/compile/nodes/SlotTemplate.ts b/src/compiler/compile/nodes/SlotTemplate.ts index 12bb2194a6..728da058e4 100644 --- a/src/compiler/compile/nodes/SlotTemplate.ts +++ b/src/compiler/compile/nodes/SlotTemplate.ts @@ -68,7 +68,7 @@ export default class SlotTemplate extends Node { if (!this.slot_template_name) { this.slot_template_name = 'default'; - this.is_static = false; + this.is_static = true; this.slot_attribute = new Attribute(component, this, scope, { type: 'Attribute', name: 'slot', diff --git a/src/compiler/compile/render_dom/wrappers/InlineComponent/index.ts b/src/compiler/compile/render_dom/wrappers/InlineComponent/index.ts index 2621c36641..369b28880c 100644 --- a/src/compiler/compile/render_dom/wrappers/InlineComponent/index.ts +++ b/src/compiler/compile/render_dom/wrappers/InlineComponent/index.ts @@ -30,7 +30,7 @@ const regex_invalid_variable_identifier_characters = /[^a-zA-Z_$]/g; export default class InlineComponentWrapper extends Wrapper { var: Identifier; slots: Map = new Map(); - staic_slot_names: Set = new Set(); + static_slot_names: Set = new Set(); node: InlineComponent; fragment: FragmentWrapper; children: Array = []; @@ -99,13 +99,13 @@ export default class InlineComponentWrapper extends Wrapper { set_slot(slot: SlotTemplate, slot_definition: SlotDefinition) { if (slot.is_static) { const name = slot.slot_template_name; - if (this.staic_slot_names.has(name)) { + if (this.static_slot_names.has(name)) { if (name === 'default') { throw new Error('Found elements without slot attribute when using slot="default"'); } throw new Error(`Duplicate slot name "${name}" in <${this.node.name}>`); } else { - this.staic_slot_names.add(name); + this.static_slot_names.add(name); } }