keithclark / selectivizr

selectivizr is a JavaScript utility that emulates CSS3 pseudo-classes and attribute selectors in Internet Explorer 6-8.
1.71k stars 247 forks source link

Error when css file is empty #53

Open thany opened 11 years ago

thany commented 11 years ago

When including a css file that happens to be empty, the following error will occur:

SCRIPT5007: Unable to get property 'replace' of undefined or null reference selectivizr.js, line 428 character 4

I suspect this happens because on line 391, xhr.responseText will be undefined, instead of an empty string.

Tested on IE10-as-IE8 on Windows 7.