diff --git a/core/modules/editor/js/editor.js b/core/modules/editor/js/editor.js index 6483170..1130f97 100644 --- a/core/modules/editor/js/editor.js +++ b/core/modules/editor/js/editor.js @@ -95,7 +95,7 @@ Drupal.behaviors.editor = { }; Drupal.editorAttach = function (field, format) { - if (format.editor) { + if (format && format.editor) { // HTML5 validation cannot ever work for WYSIWYG editors, because WYSIWYG // editors always hide the underlying textarea element, which prevents // browsers from putting the error message bubble in the right location. @@ -110,7 +110,7 @@ Drupal.editorAttach = function (field, format) { }; Drupal.editorDetach = function (field, format, trigger) { - if (format.editor) { + if (format && format.editor) { // Restore the HTML5 validation "required" attribute if it was removed in // Drupal.editorAttach(). if ('data-editor-required' in field.attributes) {