Skip to content

Commit

Permalink
Merge pull request #2406 from sveltejs/gh-2399
Browse files Browse the repository at this point in the history
skip observedAttributes where appropriate
  • Loading branch information
Rich-Harris authored Apr 13, 2019
2 parents 7fcad18 + d2568aa commit 1de67e3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
3 changes: 2 additions & 1 deletion src/compile/render-dom/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -464,9 +464,10 @@ export default function dom(
}
}
${props.length > 0 && deindent`
static get observedAttributes() {
return ${JSON.stringify(props.map(x => x.export_name))};
}
}`}
${body.length > 0 && body.join('\n\n')}
}
Expand Down
4 changes: 0 additions & 4 deletions test/js/samples/css-shadow-dom-keyframes/expected.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,6 @@ class Component extends SvelteElement {
}
}
}

static get observedAttributes() {
return [];
}
}

customElements.define("custom-element", Component);
Expand Down

0 comments on commit 1de67e3

Please sign in to comment.