if console is not defined, this will throw. you should check if `typeof console === 'undefined'`, and if it is, then set it to the fake value, otherwise leave it untouched.