Prevent a JS error when working with embedded media in TinyMCE.
props wonderboymusic. fixes #23876. git-svn-id: https://develop.svn.wordpress.org/trunk@23895 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
1b201fa81c
commit
c735c265a2
@ -438,7 +438,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Add HTML5 video element
|
// Add HTML5 video element
|
||||||
if (typeItem.name === 'Video' && data.video.sources[0]) {
|
if (typeItem.name === 'Video' && data.video.sources && data.video.sources[0]) {
|
||||||
// Create new object element
|
// Create new object element
|
||||||
video = new Node('video', 1).attr(tinymce.extend({
|
video = new Node('video', 1).attr(tinymce.extend({
|
||||||
id : node.attr('id'),
|
id : node.attr('id'),
|
||||||
@ -477,7 +477,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Add HTML5 audio element
|
// Add HTML5 audio element
|
||||||
if (typeItem.name === 'Audio' && data.video.sources[0]) {
|
if (typeItem.name === 'Audio' && data.video.sources && data.video.sources[0]) {
|
||||||
// Create new object element
|
// Create new object element
|
||||||
audio = new Node('audio', 1).attr(tinymce.extend({
|
audio = new Node('audio', 1).attr(tinymce.extend({
|
||||||
id : node.attr('id'),
|
id : node.attr('id'),
|
||||||
|
Loading…
Reference in New Issue
Block a user