simply referencing window.console fixes the error. 

window.console is required in IE, localStorage has the same issue.