# HG changeset patch # User Nathan Phillip Brink # Date 2010-10-17 08:29:39 # Node ID 2c4431ccf81ff11ff5b5563e7bd1102ceff67326 # Parent 8576082b065ff07d18536d67e471050717440646 Guard against one javascript error. diff --git a/scripts/scheduleInput.js b/scripts/scheduleInput.js --- a/scripts/scheduleInput.js +++ b/scripts/scheduleInput.js @@ -175,7 +175,7 @@ function add_sections(cnum, data) jQuery('.className' + classNum).bind('autocompletechange', {'class_num': classNum}, function(event, ui) { - if (ui.item.value.indexOf('-')) + if (ui.item && ui.item.value.indexOf('-')) { jQuery.ajax( {