diff --git a/src/directives/rn-carousel.js b/src/directives/rn-carousel.js index 96a4d32..be0a781 100755 --- a/src/directives/rn-carousel.js +++ b/src/directives/rn-carousel.js @@ -118,7 +118,8 @@ scope: true, compile: function(tElement, tAttributes) { // use the compile phase to customize the DOM - var firstChildAttributes = tElement[0].querySelector('li').attributes, + var firstChild = tElement[0].querySelector('li'), + firstChildAttributes = (firstChild) ? firstChild.attributes : [], isRepeatBased = false, isBuffered = false, repeatItem,