Skip to content

Commit

Permalink
omit attributes for SSR – fixes #163
Browse files Browse the repository at this point in the history
  • Loading branch information
Rich-Harris committed Dec 9, 2016
1 parent 941de39 commit 284224c
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/server-side-rendering/compile.js
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,8 @@ export default function compile ( source, { filename }) {
let element = `<${node.name}`;

node.attributes.forEach( attribute => {
if ( attribute.type !== 'Attribute' ) return;

let str = ` ${attribute.name}`;

if ( attribute.value !== true ) {
Expand Down
1 change: 1 addition & 0 deletions test/server-side-rendering/directives/_actual.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<button>click me</button>
1 change: 1 addition & 0 deletions test/server-side-rendering/directives/_expected.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<button>click me</button>
1 change: 1 addition & 0 deletions test/server-side-rendering/directives/main.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<button on:click='set({ foo: "bar" })'>click me</button>

0 comments on commit 284224c

Please sign in to comment.