We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 55d292a commit e668c59Copy full SHA for e668c59
files/usr/share/cinnamon/applets/[email protected]/applet.js
@@ -235,12 +235,10 @@ class Notifications {
235
this._appGroupList.forEach(appGroup => {
236
if (!appGroup.groupState || appGroup.groupState.willUnmount) return;
237
if (appId === appGroup.groupState.appId) {
238
- let i = 0;
239
- while (appGroup.notifications[i]) {
240
- if (!appGroup.notifications[i]._destroyed) {
+ // iterate backwards due to in place array modification
+ for (let i = appGroup.notifications.length - 1; i >= 0; i--) {
+ if (appGroup.notifications[i] && !appGroup.notifications[i]._destroyed) {
241
appGroup.notifications[i].destroy(NotificationDestroyedReason.DISMISSED);
242
- } else {
243
- i++;
244
}
245
246
appGroup.notifications = [];
0 commit comments