Skip to content

Commit

Permalink
Don't callback for empty responses.
Browse files Browse the repository at this point in the history
JSON.parse("") fails.
  • Loading branch information
Mike Bostock committed Jul 18, 2010
1 parent 5b89a93 commit 42bcf56
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Queue.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ po.queue = (function() {
req.onreadystatechange = function(e) {
if (req.readyState == 4) {
active--;
if (req.status < 300) callback(req.responseText);
if (req.status < 300 && req.responseText) callback(req.responseText);
process();
}
};
Expand Down
2 changes: 1 addition & 1 deletion src/start.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ if (!org) var org = {};
if (!org.polymaps) org.polymaps = {};
(function(po){

po.version = "1.0.0"; // semver.org
po.version = "1.0.1"; // semver.org

0 comments on commit 42bcf56

Please sign in to comment.