Merge branch 'MDL-75244-400' of https://github.com/andrewnicols/moodle into MOODLE_400_STABLE

This commit is contained in:
Jun Pataleta
2022-07-29 15:29:50 +08:00
3 changed files with 3 additions and 3 deletions
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -272,7 +272,7 @@ export const isAnyWatchedFormDirty = () => {
// Handle TinyMCE editor instances.
// TinyMCE forms may not have been initialised at the time that startWatching is called.
// Check whether any tinyMCE editor is dirty.
if (typeof window.tinyMCE !== 'undefined') {
if (typeof window.tinyMCE !== 'undefined' && window.tinyMCE.editors) {
if (window.tinyMCE.editors.some(editor => editor.isDirty())) {
return true;
}