Here's a screenshot:
Is this a symptom of me including route incorrectly?
And inside routes.js I list it as a dependency:
This seems reasonable to me but it looks like maybe IE8 isn't loading it at the right time the first try and has it cached the second? Everything works in the reasonable browsers.
I just spent a good hour spelunking in the IE8 debugger and have followed it down the rabbit hole. setState is undefined inside of $.route.ready when it is finally called at the end of the deferreds. In fact all of those locally defined variables inside the big anonymous function in $.route (throttling, curParams, etc) are undefined and don't seem to make it inside the closure. Perhaps they should be defined in the scope of $route itself instead and addressed directly? The context when you get to it is $route itself.
You mean the documentation app itself? Yeah, it works fine. Hrm. I'll have to look at your code to see how you are including $.route vs. the way I am because it still feels like a timing/caching thing.
Ok i figured out the issue. @Onyxrev it's as you suspected a timing issue. in route.js
this code block should be at the bottom of the page under setState and the rest of the var functions. If the file is cached, IE8 will call $.route.ready() before the entire file is loaded and we get the "object expected" error for setState.
! I found that, oddly, it didn't happen in a production build so I stopped worrying about it and learned to love tolerate the bomb. I had to launch my app and couldn't spend the time to investigate further.
Did this ever make it to master? Just updated jquerymx and am having this same issue... Thank you for posting a fix, just hope it will go into the codebase so we dont have the error again when updating!
Leave a comment on ivanmayes's reply
Change topic type
Link this topic
Provide the permalink of a topic that is related to this topic