IE8: "TypeError: Object doesn't support this property or methodundefined" on cross-domain requests #4211
Description
I believe this is unrelated to 1876, which was the only bug with similar descrip I was able to find.
using 1.2.0.rc2, repeatedly got this error; on stack trace discovered it was reported by Angular's internal log functions, so no line number or other information was available.
I'm unable to provide code as my project is proprietary; however, by running stack trace I was able to find a fix.
in my app.config I was setting $httpProvider.defaults.withCredentials = true. while stepping through, i found a caught error " SCRIPT438: Caught exception occurred : Object doesn't support this property or method" at line 6723, which is where the script attempts to set the flag on the xhr object. the exception is caught but I suspect the xhr is not completed or intialized after this error, which is sent to the error log (which appends the 'undefined' since there is no second argument).
I was able to fix by testing for XDomainRequest object before setting the flag.