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 was archived by the owner on Apr 12, 2024. It is now read-only.
In expressions, undefined or null references are supposed to short-circuit evaluation, resulting in an undefined value, but no ReferenceError or TypeError. Therefore, invoking an expression $ctrl.x() should not give an error if $ctrl.x is undefined. Great.
If, however, $ctrl.x = 4 (or any other non-undefined|null|function value), invoking $ctrl.x() gives a very hard-to-track Error: v2.x is not a function, which leads to the bowels of ASTCompiler.prototype.compile
Is this intentional, or should this bail out with undefined? Although it ultimately helped me find an issue with my code, it was extremely hard to trace (the offending fn call had a name very commonly used in our project).