cssinjs / css-vendor

Runtime vendor prefixing based on feature detection.
MIT License
66 stars 24 forks source link

Check document.documentElement #218

Closed nvi9 closed 3 years ago

nvi9 commented 3 years ago

Prevent TypeError: Cannot use 'in' operator to search for 'ontouchstart' in null

kof commented 3 years ago

thanks

nvi9 commented 3 years ago

Sorry, just found another similar here: supported-property.js#L17.

Would it be a good solution just changing if (isInBrowser) { to if (isInBrowser && document.documentElement) { on line 7?

kof commented 3 years ago

yeah