Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Ticket #7827: autoeval.diff

File autoeval.diff, 511 bytes (added by Tobie, 1 year ago)
  • src/ajax.js

    old new  
    185185        this.dispatchException(e); 
    186186      } 
    187187       
    188       if ((this.getHeader('Content-type') || 'text/javascript').strip(). 
     188      var contentType = this.getHeader('Content-type'); 
     189      if (contentType && contentType.strip(). 
    189190        match(/^(text|application)\/(x-)?(java|ecma)script(;.*)?$/i)) 
    190191          this.evalResponse(); 
    191192    }