diff --git a/emojify.js b/emojify.js index 389be840..6c98915c 100644 --- a/emojify.js +++ b/emojify.js @@ -16,7 +16,7 @@ var emojify = (function () { // Get DOM as local variable for simplicity's sake - var document = window.document; + var document = typeof window !== 'undefined' && window.document; /** * NB!