diff --git a/lib/polyfill-resize.js b/lib/polyfill-resize.js index 3ec2308..b4d1dcc 100644 --- a/lib/polyfill-resize.js +++ b/lib/polyfill-resize.js @@ -17,7 +17,10 @@ if(typeof addEvent!='function'){var addEvent=function(o,t,f,l){var d='addEventLi * Licenced under the MIT */ (function() { - var resizeSupported = document.createElement('textarea').style.resize !== undefined; + var resizeSupported; + if (typeof document !== 'undefined') { + resizeSupported = document.createElement('textarea').style.resize !== undefined; + } var resizeHandlerPolyfill = function(target, force) { if (!target) { return resizeSupported ? 'native' : 'polyfill';