Skip to content

Commit

Permalink
Make Ajax calls work for local files (file:///...).
Browse files Browse the repository at this point in the history
  • Loading branch information
tvandervossen authored and madrobby committed Sep 24, 2010
1 parent 3f9ddfa commit ce9f1f3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion zepto.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ var $ = (function() {
function ajax(method, url, success){
var r = new XMLHttpRequest();
r.onreadystatechange = function(){
if(r.readyState==4 && r.status==200)
if(r.readyState==4 && (r.status==200 || r.status==0))
success(r.responseText);
};
r.open(method,url,true);
Expand Down

0 comments on commit ce9f1f3

Please sign in to comment.