scottjehl / Respond

A fast & lightweight polyfill for min/max-width CSS3 Media Queries (for IE 6-8, and more)
MIT License
11.33k stars 3.36k forks source link

If a missing CSS file is encountered respond.js stops processing #261

Open randr01d opened 10 years ago

randr01d commented 10 years ago

At least that's what I'm seeing. Note: I know I shouldn't have a missing CSS file but i'm working with a large CMS that sometimes injects a 404 CSS reference.

I think I got the code working around it by changing the request line to:

if ( req.readyState !== 4 || req.status !== 200 && req.status !== 304 && req.status !== 404 ){

note the addition of the 404 check.

antshill commented 10 years ago

I had the same problem with a grunt created file that was missing. Removed the missing css file reference and all is well.

Wish it would throw some sort of error. If it wasnt for this issue I would have been still digging around.

Thanks!