File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -305,7 +305,8 @@ export class AssessmentReporter {
305305 ) : void {
306306 const pageSize = 1000 ;
307307 const totalLabels = customLabels . length ;
308- const totalPages = Math . ceil ( totalLabels / pageSize ) ;
308+ // Always generate at least 1 page, even if there are no labels with issues
309+ const totalPages = Math . max ( 1 , Math . ceil ( totalLabels / pageSize ) ) ;
309310
310311 // Generate paginated reports
311312 for ( let page = 1 ; page <= totalPages ; page ++ ) {
@@ -333,7 +334,8 @@ export class AssessmentReporter {
333334
334335 private static getCustomLabelAssessmentFileName ( totalLabels : number ) : string {
335336 const pageSize = 1000 ;
336- const totalPages = Math . ceil ( totalLabels / pageSize ) ;
337+ // Always generate at least 1 page, even if there are no labels with issues
338+ const totalPages = Math . max ( 1 , Math . ceil ( totalLabels / pageSize ) ) ;
337339 return totalPages > 1 ? `customlabel_assessment_Page_1_of_${ totalPages } .html` : this . customLabelAssessmentFileName ;
338340 }
339341
You can’t perform that action at this time.
0 commit comments