From bcf50004b8a1172aff4c769746fdcb9e5d5d9cba Mon Sep 17 00:00:00 2001 From: ocombe Date: Sun, 2 Nov 2014 15:52:16 +0100 Subject: [PATCH] fix: initial modules not registered Ok so this was a really stupid mistake that was around for a long time, but that was not a problem until I changed the code to allow the reconfig... And as often the fix is ridiculously simple! :) Fixes #58 Fixes #71 Fixes #73 Fixes #77 --- src/ocLazyLoad.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ocLazyLoad.js b/src/ocLazyLoad.js index ec90dfe..1969ec1 100644 --- a/src/ocLazyLoad.js +++ b/src/ocLazyLoad.js @@ -791,10 +791,10 @@ names[name] = true; append(document.getElementById(name)); name = name.replace(':', '\\:'); - if(element.querySelectorAll) { - angular.forEach(element.querySelectorAll('.' + name), append); - angular.forEach(element.querySelectorAll('.' + name + '\\:'), append); - angular.forEach(element.querySelectorAll('[' + name + ']'), append); + if(element[0].querySelectorAll) { + angular.forEach(element[0].querySelectorAll('.' + name), append); + angular.forEach(element[0].querySelectorAll('.' + name + '\\:'), append); + angular.forEach(element[0].querySelectorAll('[' + name + ']'), append); } });