Skip to content

Commit

Permalink
Merge pull request #8166 from stopfstedt/rm-slice
Browse files Browse the repository at this point in the history
removes a couple of calls to Array.slice() where they are not needed.
  • Loading branch information
dartajax authored Sep 27, 2024
2 parents 26e80ab + 489eccf commit 9452873
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ export default class ReportsSubjectSessionComponent extends Component {
? `${course.year} - ${course.year + 1}`
: `${course.year}`,
striptags(description),
striptags(mapBy(sessionObjectives.slice(), 'title').join()),
striptags(mapBy(sessionObjectives, 'title').join()),
];
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export default class CurriculumInventoryReportIndexController extends Controller
if (!this._sequenceBlocks) {
return [];
}
return this._sequenceBlocks.slice().filter((block) => !block.belongsTo('parent').id());
return this._sequenceBlocks.filter((block) => !block.belongsTo('parent').id());
}

@action
Expand Down

0 comments on commit 9452873

Please sign in to comment.