From 8f0a00dd3636ec2b1dbf67ba8ec95d9f72f7790d Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Fri, 23 Nov 2018 16:57:40 -0500 Subject: [PATCH] oops --- .gitignore | 2 +- src/compile/Component.ts | 13 ++++++------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index bd20c2c1ae..6360336df3 100644 --- a/.gitignore +++ b/.gitignore @@ -18,4 +18,4 @@ node_modules /store.umd.js /yarn-error.log _actual*.* -_ \ No newline at end of file +_* \ No newline at end of file diff --git a/src/compile/Component.ts b/src/compile/Component.ts index 0f3602fa13..b772d74c6f 100644 --- a/src/compile/Component.ts +++ b/src/compile/Component.ts @@ -124,8 +124,13 @@ export default class Component { throw new Error(`No tag name specified`); // TODO better error } + this.fragment = new Fragment(this, ast.html); + if (!this.customElement) this.stylesheet.reify(); + + this.stylesheet.warnOnUnusedSelectors(options.onwarn); + if (!this.ast.js) { - this.declarations = Array.from(this.expectedProperties); + this.declarations.push(...this.expectedProperties); addToSet(this.writable_declarations, this.expectedProperties); this.exports = this.declarations.map(name => ({ @@ -133,12 +138,6 @@ export default class Component { as: name })); } - - this.fragment = new Fragment(this, ast.html); - // this.walkTemplate(); - if (!this.customElement) this.stylesheet.reify(); - - this.stylesheet.warnOnUnusedSelectors(options.onwarn); } addSourcemapLocations(node: Node) {