Created
September 15, 2017 03:51
-
-
Save rvgpl/cb063e0e59367927a5a6a1db8c0df288 to your computer and use it in GitHub Desktop.
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
var canUseDOM = !!( | |
typeof window !== 'undefined' && | |
window.document && | |
window.document.createElement); | |
if(canUseDOM) { | |
//Do Window things | |
} | |
else { | |
//Something else | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment