You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.
// 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
// (though it differs due to having the extra check for $$listenerCount)
if (!(next = ((current.$$listenerCount[name] && current.$$childHead) ||
(current !== target && current.$$nextSibling)))) {
while (current !== target && !(next = current.$$nextSibling)) { //<<<----- current null?
current = current.$parent;
}
}
}
Under certain circumstances (that I don't yet understand), current is null. Checking for null in the loop gets rid of the error. It may be related to load. I suspect something else bad is happening that is causing this. Apologies for the lack of detail/reproducibility.
I am using Ionic but 1.3.13 of angular.
The text was updated successfully, but these errors were encountered:
@gdjennings thnx for the report. It will be rather hard to take meaningful actions on this one without more info, so anything you can do to pinpoint the problem will help tremendously....
@pkozlowski-opensource Completely understand. I wanted to get it out there in case something stood out to someone. I haven't had a chance to look further into the context of this block and under what circumstances it is even possible that current is null and why it isn't checked for in the loop. I am sometimes seeing errors in other unchecked lines (within Ionic) so perhaps a scope is being trashed in an antisocial way by myself, Ionic or Apple.
A couple of additional notes
A project I'm working on is running into a similar issue. It seems the easiest way to reproduce it is to destroy the parent scope from within the child scope by way of $broadcast/$emit. Here's a simple jsFiddle that shows the behavior:
Note that the error message is different in Chrome vs Firefox. In Firefox, the error message is "TypeError: current is null" whereas in Chrome it's "TypeError: Cannot read property '$$nextSibling' of null". This is the same error and occurs in the same location:
There are other areas where it is assumed that the current object will exist even if it does not (in this case, that's because we've destroyed the parent of the element from which we're calling $broadcast).
I should also note that this is not, in fact, limited to just iOS/Cordova/etc.
From rootscope.js...
Under certain circumstances (that I don't yet understand), current is null. Checking for null in the loop gets rid of the error. It may be related to load. I suspect something else bad is happening that is causing this. Apologies for the lack of detail/reproducibility.
I am using Ionic but 1.3.13 of angular.
The text was updated successfully, but these errors were encountered: