Skip to content

Commit

Permalink
Improve test for media modal select type
Browse files Browse the repository at this point in the history
  • Loading branch information
funkatron82 committed May 14, 2017
1 parent 2255a0f commit 2372d05
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions js/media.js
Original file line number Diff line number Diff line change
Expand Up @@ -376,10 +376,10 @@ jQuery( function ( $ ) {
//this.stopListening( this._frame );
this._frame.dispose();
}

var maxFiles = this.controller.get( 'maxFiles');
this._frame = wp.media( {
className: 'media-frame rwmb-media-frame',
multiple: this.controller.get( 'maxFiles') > 1 ? 'add' : false,
multiple: maxFiles > 1 || maxFiles <= 0 ? 'add' : false,
title: i18nRwmbMedia.select,
editing: true,
library: {
Expand Down

0 comments on commit 2372d05

Please sign in to comment.