Permalink
Browse files

Merge branch 'MDL-38356-m' of git://github.com/andrewnicols/moodle

  • Loading branch information...
2 parents 34bbe80 + 7e21ee6 commit e14cc639f177ed59773ebdf0c0080a1cbcd180ec @nebgor nebgor committed Mar 12, 2013
Showing with 5 additions and 0 deletions.
  1. +5 −0 lib/yui/formchangechecker/formchangechecker.js
@@ -18,6 +18,11 @@ YUI.add('moodle-core-formchangechecker',
var formid = 'form#' + this.get('formid'),
currentform = Y.one(formid);
+ if (!currentform) {
+ // If the form was not found, then we can't check for changes.
+ return;
+ }
+
// Add change events to the form elements
currentform.delegate('change', M.core_formchangechecker.set_form_changed, 'input', this);
currentform.delegate('change', M.core_formchangechecker.set_form_changed, 'textarea', this);

0 comments on commit e14cc63

Please sign in to comment.