Make WordPress Core

Changeset 23895


Ignore:
Timestamp:
04/03/2013 08:49:41 PM (11 years ago)
Author:
nacin
Message:

Prevent a JS error when working with embedded media in TinyMCE.

props wonderboymusic. fixes #23876.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/js/tinymce/plugins/media/editor_plugin_src.js

    r21545 r23895  
    439439
    440440            // Add HTML5 video element
    441             if (typeItem.name === 'Video' && data.video.sources[0]) {
     441            if (typeItem.name === 'Video' && data.video.sources && data.video.sources[0]) {
    442442                // Create new object element
    443443                video = new Node('video', 1).attr(tinymce.extend({
     
    478478
    479479            // Add HTML5 audio element
    480             if (typeItem.name === 'Audio' && data.video.sources[0]) {
     480            if (typeItem.name === 'Audio' && data.video.sources && data.video.sources[0]) {
    481481                // Create new object element
    482482                audio = new Node('audio', 1).attr(tinymce.extend({
Note: See TracChangeset for help on using the changeset viewer.