So I figured out the issue with a little help from a friend.
It didn't seem right that this variable check would be the issue, so I started putting alerts in my code at different places in the code to see how far it got, and alas: the error happened on an entirely different line.
It appeared I had a left over
console.dir("<snip>")
call in the JavaScript, and it does not look like IE8 supports the console.dir()
call, but the console.log()
call is still supported if the developer tool is open (thanks to @Reinder Wit). I removed this line, and it worked again.
If you encounter an error like this, throw in some alerts at various lines in your code and see how far the code gets before crashing. It seems like the JavaScript error logging console in IE8 does not know the correct parts of your code where errors occur.