Skip to content

Commit

Permalink
Merge pull request #206 from unDemian/master
Browse files Browse the repository at this point in the history
fix: add extra condition to improve karma testing
  • Loading branch information
ocombe committed Jul 3, 2015
2 parents c7b61e8 + f0c33aa commit c3fda90
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ocLazyLoad.core.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
names[name] = true;
append(document.getElementById(name));
name = name.replace(':', '\\:');
if(element[0].querySelectorAll) {
if(typeof(element[0]) !== 'undefined' && element[0].querySelectorAll) {
angular.forEach(element[0].querySelectorAll(`.${ name }`), append);
angular.forEach(element[0].querySelectorAll(`.${ name }\\:`), append);
angular.forEach(element[0].querySelectorAll(`[${ name }]`), append);
Expand Down

0 comments on commit c3fda90

Please sign in to comment.