Skip to content

Commit

Permalink
assert that specified alignment target exists
Browse files Browse the repository at this point in the history
  • Loading branch information
kagemusha committed Aug 1, 2015
1 parent ed892c0 commit 24debe0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions addon/components/positioned-container.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ export default Ember.Component.extend({
updateAlignment: function() {
var alignmentTarget = this.get('alignmentTarget');
if (Ember.typeOf(alignmentTarget) === 'string') {
let alignmentTargetSelector = alignmentTarget;
alignmentTarget = Ember.$(alignmentTarget)[0];
Ember.assert(`No element found for modal-dialog's alignmentTarget selector '${alignmentTargetSelector}'.`, alignmentTarget);
} else if (alignmentTarget && alignmentTarget.element) {
alignmentTarget = alignmentTarget.element;
}
Expand Down

0 comments on commit 24debe0

Please sign in to comment.