CRM-16354 - Add sanity check
authorColeman Watts <coleman@civicrm.org>
Tue, 27 Oct 2015 19:12:26 +0000 (15:12 -0400)
committerColeman Watts <coleman@civicrm.org>
Tue, 27 Oct 2015 19:12:26 +0000 (15:12 -0400)
js/wysiwyg/crm.ckeditor.js

index b856dee0289fbc255a5e8d595591cc7b3caa766b..853252e88c4894229ecdbbb9e8e9df00538a3a84 100644 (file)
@@ -5,10 +5,10 @@
   function getInstance(item) {
     var name = $(item).attr("name"),
       id = $(item).attr("id");
-    if (name && CKEDITOR.instances[name]) {
+    if (name && window.CKEDITOR && CKEDITOR.instances[name]) {
       return CKEDITOR.instances[name];
     }
-    if (id && CKEDITOR.instances[id]) {
+    if (id && window.CKEDITOR && CKEDITOR.instances[id]) {
       return CKEDITOR.instances[id];
     }
   }