simply referencing window.console fixes the error. 

window.console is required in IE, localStorage has the same issue. You should reference the console always with the windows prefix