diff --git a/src/compiler/compile/Component.ts b/src/compiler/compile/Component.ts index c09c1d96df..10cd1d5e91 100644 --- a/src/compiler/compile/Component.ts +++ b/src/compiler/compile/Component.ts @@ -1138,15 +1138,15 @@ export default class Component { } } - if (inserts.length > 0) { - parent[key].splice(index + 1, 0, ...inserts); - } - if (props.length > 0) { - parent[key].splice(index + 1, 0, b`let { ${props} } = $$props;`); - } - if (node.declarations.length == 0) { - parent[key].splice(index, 1); - } + if (inserts.length > 0) { + parent[key].splice(index + 1, 0, ...inserts); + } + if (props.length > 0) { + parent[key].splice(index + 1, 0, b`let { ${props} } = $$props;`); + } + if (node.declarations.length == 0) { + parent[key].splice(index, 1); + } return this.skip(); }