Permalink
Browse files

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

…into MOODLE_23_STABLE
  • Loading branch information...
2 parents c2fb582 + ab13a53 commit 771053bd830410b435fe102b20fd4ccabbd4dd4a @nebgor nebgor committed Mar 12, 2013
Showing with 5 additions and 0 deletions.
  1. +5 −0 lib/yui/formchangechecker/formchangechecker.js
@@ -17,6 +17,11 @@ YUI.add('moodle-core-formchangechecker',
initializer : function(config) {
var formid = 'form#' + this.get('formid');
+ if (!currentform) {
+ // If the form was not found, then we can't check for changes.
+ return;
+ }
+
// Add change events to the form elements
Y.all(formid + ' input').once('change', M.core_formchangechecker.set_form_changed, this);
Y.all(formid + ' textarea').once('change', M.core_formchangechecker.set_form_changed, this);

0 comments on commit 771053b

Please sign in to comment.