Fix #2534: Address @jashkenas review comment.

This commit is contained in:
Philipp von Weitershausen 2012-09-07 12:53:37 -07:00
parent ec59a626f2
commit 78423e9a14
1 changed files with 3 additions and 3 deletions

View File

@ -18,10 +18,10 @@ return unless window?
# Load a remote script from the current domain via XHR.
CoffeeScript.load = (url, callback) ->
if window.ActiveXObject
xhr = new window.ActiveXObject('Microsoft.XMLHTTP')
xhr = if window.ActiveXObject
new window.ActiveXObject('Microsoft.XMLHTTP')
else
xhr = new XMLHttpRequest()
new XMLHttpRequest()
xhr.open 'GET', url, true
xhr.overrideMimeType 'text/plain' if 'overrideMimeType' of xhr
xhr.onreadystatechange = ->