Last active
January 28, 2020 07:32
-
-
Save crrmacarse/1f1081986bbde94f6de1961713858650 to your computer and use it in GitHub Desktop.
Validate If the current environment is a browser
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const hasDom = (typeof window !== 'undefined' && typeof document !== 'undefined') | |
export default hasDom |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment