From 37704c5cb83fd5d1b4efe5637abeb5fd46d07a3f Mon Sep 17 00:00:00 2001 From: Andrew Ozz Date: Mon, 30 May 2016 22:04:18 +0000 Subject: [PATCH] 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 --- src/wp-includes/js/tinymce/plugins/wpview/plugin.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/js/tinymce/plugins/wpview/plugin.js b/src/wp-includes/js/tinymce/plugins/wpview/plugin.js index 4eb1bb497a..0202816db9 100644 --- a/src/wp-includes/js/tinymce/plugins/wpview/plugin.js +++ b/src/wp-includes/js/tinymce/plugins/wpview/plugin.js @@ -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 };