Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

Commit

Permalink
fix(list): check child element length before detecting proxies
Browse files Browse the repository at this point in the history
closes #2337
  • Loading branch information
rschmukler committed Apr 17, 2015
1 parent d7b2376 commit c964609
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/list/list.js
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,8 @@ function mdListItemDirective($mdAria, $mdConstant, $timeout) {
}

function computeProxies() {
if (!$element.children()[0].hasAttribute('ng-click')) {
var children = $element.children();
if (children.length && !children[0].hasAttribute('ng-click')) {
angular.forEach(proxiedTypes, function(type) {
angular.forEach($element[0].firstElementChild.querySelectorAll(type), function(child) {
proxies.push(child);
Expand Down

0 comments on commit c964609

Please sign in to comment.