Skip to content
Browse files

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.
  • Loading branch information...
1 parent 3294034 commit 10f2c0fb49b6ea402c76e7bf3e544331a2735284 @andrewnicols andrewnicols committed Jul 23, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/yui/formchangechecker/formchangechecker.js
View
2 lib/yui/formchangechecker/formchangechecker.js
@@ -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;
}

0 comments on commit 10f2c0f

Please sign in to comment.
Something went wrong with that request. Please try again.