Skip to content

Commit f0c33aa

Browse files
author
Andrei Demian
committed
fix: add extra condition to improve karma testing
1 parent c7b61e8 commit f0c33aa

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/ocLazyLoad.core.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
names[name] = true;
7272
append(document.getElementById(name));
7373
name = name.replace(':', '\\:');
74-
if(element[0].querySelectorAll) {
74+
if(typeof(element[0]) !== 'undefined' && element[0].querySelectorAll) {
7575
angular.forEach(element[0].querySelectorAll(`.${ name }`), append);
7676
angular.forEach(element[0].querySelectorAll(`.${ name }\\:`), append);
7777
angular.forEach(element[0].querySelectorAll(`[${ name }]`), append);

0 commit comments

Comments
 (0)