Issue #2031529 by Wim Leers, oadaeh: Fixed JavaScript error when submitting a form that has a text_format() selector set to a text format without associated text editor.
parent
2055c7ed4e
commit
0adcf47245
|
@ -60,7 +60,10 @@ Drupal.behaviors.editor = {
|
|||
if (event.isDefaultPrevented()) {
|
||||
return;
|
||||
}
|
||||
Drupal.editorDetach(field, settings.editor.formats[activeFormatID], 'serialize');
|
||||
// Detach the current editor (if any).
|
||||
if (settings.editor.formats[activeFormatID]) {
|
||||
Drupal.editorDetach(field, settings.editor.formats[activeFormatID], 'serialize');
|
||||
}
|
||||
});
|
||||
});
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue