MDL-34433 Check for existence of e and e.target in set_form_changed
This is required for cases when code directly calls set_form_changed as happens with the filepicker.
This commit is contained in:
+1
-1
@@ -93,7 +93,7 @@ YUI.add('moodle-core-formchangechecker',
|
||||
* Set the form changed state to true
|
||||
*/
|
||||
M.core_formchangechecker.set_form_changed = function(e) {
|
||||
if (e.target.hasClass('ignoredirty')) {
|
||||
if (e && e.target && e.target.hasClass('ignoredirty')) {
|
||||
// Don't warn on elements with the ignoredirty class
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user