I have an angular script, which broadcasts an event on the $rootScope (using $$broadcast). The version of angular I'm using is 1.1.4
On some occassions , this throws an exception inside the angular code:
Uncaught TypeError: cannot read property '$$nextSibling' of null.
Does any one has a clue what might be causing this error ? Unfortunately the code in which this error occurs is to big to post, but maybe someone could point me in the right direction?
The angular code where it happens is :
// Insanity Warning: scope depth-first traversal
// yes, this code is a bit crazy, but it works and we have tests to prove it!
// this piece should be kept in sync with the traversal in $digest
if (!(next = (current.$$childHead || (current !== target && current.$$nextSibling)))) {
while(current !== target && !(next = current.$$nextSibling)) {
on the while statement
update: the broadcast is excuted from inside a clicked event on an external component the click event is an property of a config object for the external component.
$timeout(function(){
//do stuff
});
$timeout
without a wait time works as well.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With