Changeset 27317
- Timestamp:
- 02/27/2014 08:10:32 PM (12 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-includes/js/media-editor.js (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/js/media-editor.js
r27315 r27317 213 213 classes = props.classes || []; 214 214 215 img.src = typeof attachment !== 'undefined'? attachment.url : props.url;215 img.src = ! _.isUndefined( attachment ) ? attachment.url : props.url; 216 216 _.extend( img, _.pick( props, 'width', 'height', 'alt' ) ); 217 217 … … 280 280 return _.extend( attributes, { 281 281 coerce: function ( attrs, key ) { 282 if ( 'undefined' === typeof attrs[ key ] && 'undefined' !== typeof this.defaults[ key ]) {282 if ( _.isUndefined( attrs[ key ] ) && ! _.isUndefined( this.defaults[ key ] ) ) { 283 283 attrs[ key ] = this.defaults[ key ]; 284 284 } else if ( 'true' === attrs[ key ] ) { … … 633 633 insert: function( html ) { 634 634 var editor, 635 hasTinymce = typeof tinymce !== 'undefined',636 hasQuicktags = typeof QTags !== 'undefined',635 hasTinymce = ! _.isUndefined( tinymce ), 636 hasQuicktags = ! _.isUndefined( QTags ), 637 637 wpActiveEditor = window.wpActiveEditor; 638 638 … … 799 799 800 800 // If that doesn't work, fall back to `tinymce.activeEditor.id`. 801 if ( ! id && typeof tinymce !== 'undefined'&& tinymce.activeEditor ) {801 if ( ! id && ! _.isUndefined( tinymce ) && tinymce.activeEditor ) { 802 802 id = tinymce.activeEditor.id; 803 803 } … … 930 930 /* 931 931 // Save a bookmark of the caret position in IE. 932 if ( typeof tinymce !== 'undefined') {932 if ( ! _.isUndefined( tinymce ) ) { 933 933 editor = tinymce.get( id ); 934 934
Note: See TracChangeset
for help on using the changeset viewer.