Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit62c9289

Browse files
fix: index out of range bug (#289)
The for loop condition needs to dependon the RANGE, otherwise it the indexwill go out of range when we accessi + RANGE - 1 inside the for loop.Signed-off-by: Harikrishnan Balagopal <harikrishmenon@gmail.com>
1 parent8c5affc commit62c9289

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

‎lib/src/Gren.js‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -536,7 +536,7 @@ class Gren {
536536
constlabels=Array.from(issue.labels);
537537

538538
if(!labels.length&&this.options.template.noLabel){
539-
labels.push({name:this.options.template.noLabel});
539+
labels.push({name:this.options.template.noLabel});
540540
}
541541

542542
returnlabels
@@ -804,7 +804,7 @@ class Gren {
804804
return;
805805
}
806806

807-
issue.labels.push({name:this.options.template.noLabel});
807+
issue.labels.push({name:this.options.template.noLabel});
808808
}
809809

810810
constlabelName=issue.labels[0].name;
@@ -849,7 +849,7 @@ class Gren {
849849
constgroups=Object.keys(groupBy).reduce((carry,group,i,arr)=>{
850850
constgroupIssues=issues.filter(issue=>{
851851
if(!issue.labels.length&&this.options.template.noLabel){
852-
issue.labels.push({name:this.options.template.noLabel});
852+
issue.labels.push({name:this.options.template.noLabel});
853853
}
854854

855855
returnissue.labels.some(label=>{
@@ -1093,7 +1093,7 @@ class Gren {
10931093
});
10941094
}
10951095

1096-
for(leti=0;i<sortedReleaseDates.length-1;i++){
1096+
for(leti=0;i<sortedReleaseDates.length-RANGE+1;i++){
10971097
constuntil=sortedReleaseDates[i+1].date;
10981098
ranges.push([
10991099
sortedReleaseDates[i],

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp