TinyMCE: check if `wp.mce.views` exists before loading the wpview plugin. Fixes a js error when the rest of the media scripts are not loaded.

Fixes #36977.

git-svn-id: https://develop.svn.wordpress.org/trunk@37597 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Ozz 2016-05-30 22:04:18 +00:00
parent 9e9aeac12b
commit 37704c5cb8
1 changed files with 1 additions and 1 deletions

View File

@ -5,7 +5,7 @@
tinymce.PluginManager.add( 'wpview', function( editor ) {
function noop () {}
if ( ! wp || ! wp.mce ) {
if ( ! wp || ! wp.mce || ! wp.mce.views ) {
return {
getView: noop
};