Director is throwing this error at times, from this line in the code
this.history === true ? window.onpopstate() : window.onhashchange();
Not too sure about this, a bit strange that the window doesn't have this function no?
Edit
Right so I just commented out the setTimeout and replaced it with window.onpopstate = onchange; and this fixed everything. Hopefully that's all that needs to be done.