mirror of
https://gitlab.gnome.org/june/top-bar-organizer.git
synced 2026-01-10 00:12:55 +01:00
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:
parent
1e87992081
commit
114e1335d1
1 changed files with 2 additions and 7 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue