Make WordPress Core

Changeset 51123


Ignore:
Timestamp:
06/08/2021 11:12:23 PM (3 years ago)
Author:
antpb
Message:

Media: Allow multi-uploads in Galleries.

Previously, when more than one media item was uploaded using a gallery, failures occurred on the second upload.

Props glendaviesnz, Mista-Flo, hellofromTonya.
Fixes #53169.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/js/media/views/uploader/status.js

    r50352 r51123  
    9797        });
    9898
    99         this.$index.text( index + 1 );
    100         this.$total.text( queue.length );
    101         this.$filename.html( active ? this.filename( active.get('filename') ) : '' );
     99        if ( this.$index && this.$total && this.$filename ) {
     100            this.$index.text( index + 1 );
     101            this.$total.text( queue.length );
     102            this.$filename.html( active ? this.filename( active.get('filename') ) : '' );
     103        }
    102104    },
    103105    /**
Note: See TracChangeset for help on using the changeset viewer.