Skip to content

Commit

Permalink
Break infinite loop on invalid date.
Browse files Browse the repository at this point in the history
  • Loading branch information
mbostock committed Aug 22, 2013
1 parent cc4a1d0 commit fa2892e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion d3.js
Original file line number Diff line number Diff line change
Expand Up @@ -8859,7 +8859,7 @@ d3 = function() {
var domain = scale.domain(), extent = d3_scaleExtent(domain), method = interval == null ? tickMethod(extent, 10) : typeof interval === "number" && tickMethod(extent, interval);
if (method) interval = method[0], skip = method[1];
function skipped(date) {
return !interval.range(date, d3_time_scaleDate(+date + 1), skip).length;
return !isNaN(date) && !interval.range(date, d3_time_scaleDate(+date + 1), skip).length;
}
return scale.domain(d3_scale_nice(domain, skip > 1 ? {
floor: function(date) {
Expand Down
Loading

0 comments on commit fa2892e

Please sign in to comment.