still need the `window` check so that this doesn’t log in Node.js