Skip to content

Commit

Permalink
fix: add extra condition to improve karma testing
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrei Demian committed Jul 3, 2015
1 parent c7b61e8 commit f0c33aa
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 f0c33aa

Please # to comment.