sciactive / pnotify

Beautiful JavaScript notifications with Web Notifications support.
https://sciactive.com/pnotify/
Apache License 2.0
3.65k stars 513 forks source link

PNotify.removeAll not working #173

Closed askone closed 6 years ago

askone commented 9 years ago

When you want to delete all notifications from the collection of only a part of them is removed. The problem concerns the application of the method $ .each and Array.splice together. The solution is to modify the removeAll method to the form:

removeAll: function () {
   var i = PNotify.notices.length;
   while (i--) {
       if (PNotify.notices[i].remove) {
            PNotify.notices[i].remove(false);
       }
    }
}
hperrin commented 6 years ago

Fixed in develop branch. (v4)