Skip to content

Commit

Permalink
Merge pull request #773 from w3c/plh/match-null
Browse files Browse the repository at this point in the history
string.match(regexp) returns null if no match
  • Loading branch information
deniak authored Sep 17, 2018
2 parents 891def3 + 06f00a7 commit 989e5d2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/validator.js
Original file line number Diff line number Diff line change
Expand Up @@ -329,10 +329,12 @@ Specberus.prototype.getFeedbackDueDate = function() {
;
dates= [];

for (var i = 0; i < candidates.length; i++) {
if (candidates !== null) {
for (var i = 0; i < candidates.length; i++) {
var d = this.stringToDate(candidates[i]);
if (d >= lowBound && d < highBound)
dates.push(d);
}
}
}
return dates;
Expand Down

0 comments on commit 989e5d2

Please sign in to comment.