Changeset 33091
- Timestamp:
- 07/06/2015 03:33:53 PM (9 years ago)
- Location:
- trunk/src/wp-includes/js
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/js/media-models.js
r32916 r33091 898 898 var type = this.props.get('type'), atts = attachment.toJSON(), mime, found; 899 899 900 if ( ! type || ( _.isArray( type ) && ! type.length ) ) { 901 return true; 902 } 903 900 904 mime = atts.mime || ( atts.file && atts.file.type ) || ''; 901 905 902 906 if ( _.isArray( type ) ) { 903 found = ! type.length ||_.find( type, function (t) {907 found = _.find( type, function (t) { 904 908 return -1 !== mime.indexOf( t ); 905 909 } ); 906 910 } else { 907 found = ! type ||-1 !== mime.indexOf( type );911 found = -1 !== mime.indexOf( type ); 908 912 } 909 913 -
trunk/src/wp-includes/js/media/models/attachments.js
r32916 r33091 494 494 var type = this.props.get('type'), atts = attachment.toJSON(), mime, found; 495 495 496 if ( ! type || ( _.isArray( type ) && ! type.length ) ) { 497 return true; 498 } 499 496 500 mime = atts.mime || ( atts.file && atts.file.type ) || ''; 497 501 498 502 if ( _.isArray( type ) ) { 499 found = ! type.length ||_.find( type, function (t) {503 found = _.find( type, function (t) { 500 504 return -1 !== mime.indexOf( t ); 501 505 } ); 502 506 } else { 503 found = ! type ||-1 !== mime.indexOf( type );507 found = -1 !== mime.indexOf( type ); 504 508 } 505 509
Note: See TracChangeset
for help on using the changeset viewer.