Skip to content

Commit

Permalink
Avoid RegExp bug in FF 3.6.
Browse files Browse the repository at this point in the history
  • Loading branch information
mbostock committed May 1, 2011
1 parent 603d86a commit df2e3c2
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 4 deletions.
2 changes: 2 additions & 0 deletions d3.csv.js
Expand Up @@ -26,6 +26,8 @@ d3.csv.parseRows = function(text, f) {
t, // the current token
eol; // is the current token followed by EOL?

re.lastIndex = 0; // work-around bug in FF 3.6

/** @private Returns the next token. */
function token() {
if (re.lastIndex == text.length) return EOF; // special case: end of file
Expand Down
2 changes: 1 addition & 1 deletion d3.csv.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion d3.js
@@ -1,4 +1,4 @@
(function(){d3 = {version: "1.14.1"}; // semver
(function(){d3 = {version: "1.14.2"}; // semver
if (!Date.now) Date.now = function() {
return +new Date();
};
Expand Down
2 changes: 1 addition & 1 deletion d3.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/core/core.js
@@ -1 +1 @@
d3 = {version: "1.14.1"}; // semver
d3 = {version: "1.14.2"}; // semver
2 changes: 2 additions & 0 deletions src/csv/parse.js
Expand Up @@ -21,6 +21,8 @@ d3.csv.parseRows = function(text, f) {
t, // the current token
eol; // is the current token followed by EOL?

re.lastIndex = 0; // work-around bug in FF 3.6

/** @private Returns the next token. */
function token() {
if (re.lastIndex == text.length) return EOF; // special case: end of file
Expand Down

0 comments on commit df2e3c2

Please sign in to comment.