WordPress.org

Make WordPress Core

Ticket #17483: wp-lists.dev.js.patch

File wp-lists.dev.js.patch, 370 bytes (added by mintindeed, 7 years ago)

wpList.add only appends if element with same ID doesn't already exist

  • wp-includes/js/wp-lists.dev.js

     
    346346
    347347                } else if ( s.pos < 0 ) {
    348348                        list.prepend(e);
    349                 } else {
     349                } else if ( 0 === $('#' + s.element).size() ) {
    350350                        list.append(e);
    351351                }
    352352