Skip to content

Commit

Permalink
[BUGFIX release] Ensure nested custom elements render properly.
Browse files Browse the repository at this point in the history
A bug was introduced with the Glimmer update that was included in
Ember 2.13 that caused an error to be thrown when using nested
custom elements like:

```hbs
<foo-bar>
  <baz-qux></baz-qux>
</foo-bar>
```

The fix was done upstream in glimmerjs/glimmer-vm#488.

(cherry picked from commit 15c2d25)
  • Loading branch information
rwjblue committed May 17, 2017
1 parent 005cff8 commit 20e0ba6
Show file tree
Hide file tree
Showing 3 changed files with 940 additions and 774 deletions.
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@
"link:glimmer": "node bin/yarn-link-glimmer.js"
},
"dependencies": {
"@glimmer/compiler": "^0.22.0",
"@glimmer/compiler": "^0.22.1",
"@glimmer/di": "^0.1.8",
"@glimmer/node": "^0.22.0",
"@glimmer/reference": "^0.22.0",
"@glimmer/runtime": "^0.22.0",
"@glimmer/util": "^0.22.0",
"@glimmer/node": "^0.22.1",
"@glimmer/reference": "^0.22.1",
"@glimmer/runtime": "^0.22.1",
"@glimmer/util": "^0.22.1",
"broccoli-funnel": "^1.0.6",
"broccoli-merge-trees": "^1.1.4",
"ember-cli-get-component-path-option": "^1.0.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3129,4 +3129,24 @@ moduleFor('Components test: curly components', class extends RenderingTest {

this.assertText('huzzah!');
}

['@test can use custom element in component layout'](assert) {
this.registerComponent('foo-bar', {
template: '<blah-zorz>Hi!</blah-zorz>'
});

this.render('{{foo-bar}}');

this.assertText('Hi!');
}

['@test can use nested custom element in component layout'](assert) {
this.registerComponent('foo-bar', {
template: '<blah-zorz><hows-it-going>Hi!</hows-it-going></blah-zorz>'
});

this.render('{{foo-bar}}');

this.assertText('Hi!');
}
});

0 comments on commit 20e0ba6

Please sign in to comment.