mirror of
https://gitlab.gnome.org/julianschacher/top-bar-organizer.git
synced 2025-10-27 15:19:09 +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;
|
roles = this.#taskUpUltraLiteItemRoles;
|
||||||
}
|
}
|
||||||
|
|
||||||
// If there are no roles associated, continue.
|
// Create a new resolved box order item for each role and add it to
|
||||||
if (roles.length === 0) {
|
// the resolved box order.
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Otherwise create a new resolved box order item for each role and
|
|
||||||
// add it to the resolved box order.
|
|
||||||
for (const role of roles) {
|
for (const role of roles) {
|
||||||
const newResolvedBoxOrderItem = JSON.parse(JSON.stringify(resolvedBoxOrderItem));
|
const newResolvedBoxOrderItem = JSON.parse(JSON.stringify(resolvedBoxOrderItem));
|
||||||
newResolvedBoxOrderItem.role = role;
|
newResolvedBoxOrderItem.role = role;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user