Self hosted FLOSS fitness/workout, nutrition and weight tracker
Only initialise the tinyMCE editor on pages that actually loaded its JS file
Roland Geider84ce016efad4
diff --git a/manager/static/js/workout-manager.js b/manager/static/js/workout-manager.jsindex 71a8356f6..4261e866b 100644--- a/manager/static/js/workout-manager.js+++ b/manager/static/js/workout-manager.js@@ -149,11 +149,16 @@ function setup_inplace_editing()* Init calls for tinyMCE editor*/function init_tinymce () {- tinyMCE.init({- // General options- mode : "textareas",- theme : "simple"- });++ // Only try to init it on pages that loaded it (so they probably need it)+ if (tinyMCE)+ {+ tinyMCE.init({+ // General options+ mode : "textareas",+ theme : "simple"+ });+ }}