mirror of
https://gitlab.gnome.org/julianschacher/top-bar-organizer.git
synced 2025-10-27 07:09:07 +00: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
@ -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…
x
Reference in New Issue
Block a user