refactor: remove unneces. check for empty array in #getResolvedBoxOrder

Remove unnecessary check for empty array in #getResolvedBoxOrder as
nothing happens when the array is empty anyway.
This commit is contained in:
June 2025-06-12 01:30:43 +02:00
parent 1e87992081
commit 114e1335d1
No known key found for this signature in database

View File

@ -215,13 +215,8 @@ export default class BoxOrderManager extends GObject.Object {
roles = this.#taskUpUltraLiteItemRoles;
}
// If there are no roles associated, continue.
if (roles.length === 0) {
continue;
}
// Otherwise create a new resolved box order item for each role and
// add it to the resolved box order.
// Create a new resolved box order item for each role and add it to
// the resolved box order.
for (const role of roles) {
const newResolvedBoxOrderItem = JSON.parse(JSON.stringify(resolvedBoxOrderItem));
newResolvedBoxOrderItem.role = role;