Angularjs error on $$ cast

I have an angular script that broadcasts an event to $ rootScope (using $$ broadcast). The angular version I'm using is 1.1.4

In some cases, this throws an exception inside the angular code:

Uncaught TypeError: cannot read property '$$ nextSibling' from null.

Does anyone know what might cause this error? Unfortunately, the code in which this error occurs is great to post, but maybe someone can point me in the right direction?

Angular code where this happens:

   // 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)) {

for while statement

: Broadcasting is excluded from within the event with a click on an external component. The click event is a property of the configuration object for the external component.

+5
source share
2

$$ . $$ , ... Sp safeApply ( - ). , angular, ,

-2
$timeout(function(){
    //do stuff
});

$timeout .

+12

All Articles