diff --git a/modules/feature/minimize.js b/modules/feature/minimize.js index e8240f1..c3844b2 100644 --- a/modules/feature/minimize.js +++ b/modules/feature/minimize.js @@ -69,12 +69,11 @@ export default class MinimalUIMinimize { if (MinimalUIMinimize.minimizedStash[i]?.app.appId === app.appId) { MinimalUIMinimize.minimizedStash[i].position = Object.assign({}, app.position); targetPos = i; - break } else if (!targetPos && !MinimalUIMinimize.minimizedStash[i]?.app.rendered) { MinimalUIMinimize.minimizedStash[i] = {app: app, position: Object.assign({}, app.position)}; targetPos = i; - break; - } + } else if (targetPos && !MinimalUIMinimize.minimizedStash[i]?.app.rendered) + delete MinimalUIMinimize.minimizedStash[i]; } return targetPos; }