From d7215443bb1414396ba3c35a42cb3e5dcf5cece0 Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Fri, 23 Nov 2018 20:21:29 -0500 Subject: [PATCH] prevent double declarations --- src/compile/Component.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/compile/Component.ts b/src/compile/Component.ts index b772d74c6f..6c8394871d 100644 --- a/src/compile/Component.ts +++ b/src/compile/Component.ts @@ -130,10 +130,11 @@ export default class Component { this.stylesheet.warnOnUnusedSelectors(options.onwarn); if (!this.ast.js) { - this.declarations.push(...this.expectedProperties); + const props = [...this.expectedProperties]; + this.declarations.push(...props); addToSet(this.writable_declarations, this.expectedProperties); - this.exports = this.declarations.map(name => ({ + this.exports = props.map(name => ({ name, as: name }));