Skip to content

Commit

Permalink
Merge pull request Polymer#20 from PolymerLabs/selector-children
Browse files Browse the repository at this point in the history
[x-selector] Default to child elements if selectable is not provided
  • Loading branch information
nevir committed Nov 17, 2014
2 parents cb72d75 + f08659d commit 5cfaced
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions components/x-elements/x-selector.html
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,13 @@

get items() {
if (!this._items) {
this._items =
Array.prototype.slice.call(this.querySelectorAll(this.selectable), 0)
var nodes;
if (this.selectable) {
nodes = this.querySelectorAll(this.selectable);
} else {
nodes = this.children;
}
this._items = Array.prototype.slice.call(nodes, 0);
}
return this._items;
},
Expand Down

0 comments on commit 5cfaced

Please sign in to comment.