-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[BUGFIX beta] Add assertion when calling this.$() in a tagless view.
- Loading branch information
Showing
2 changed files
with
18 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
871aa64
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change breaks a library I use. I extracted out the breaking bit http://emberjs.jsbin.com/mukikojusa/2/edit?html,js,output
871aa64
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kellyselden that break appears expected. That library must check if the view is tagless or not. I have no idea what $() is supposed to be for a tagless view, it is basically just an invalid case.
An add-on that adds this to every view seems dubious at best.
871aa64
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@stefanpenner after researching more, I agree with the change and the unexpectedness of using it.
If you're curious, the library is ember-animate. It manages to function with it so maybe it was unused code.
871aa64
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In an Ember CLI
moduleForComponent
,this.render()
is failing this assertion for my tagless component. I guess Ember CLI's test helpers need to be updated for this?871aa64
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
871aa64
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@stefanpenner, sorry I'm a bit confused. Shouldn't all view's be using a div tag unless otherwise specified? In @kellyselden's JS Bin, he's never explicitly saying
tagName: ''
, so why does that break?871aa64
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OutletView is tagless
871aa64
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey look at that! So he is. Sneaky little bugger.