Skip to content

Commit

Permalink
Check for category element before running category element error chec…
Browse files Browse the repository at this point in the history
…king code.
  • Loading branch information
Kahil Jallad committed Dec 24, 2009
1 parent 74cacbe commit 1c6b8bf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion comp/media/js/lib.js
Expand Up @@ -597,7 +597,7 @@ function confirmChanges(obj) {
}

// Check for invalid category.
if (Element.visible('new_cat_warning')) {
if ($('new_cat_warning') && Element.visible('new_cat_warning')) {
// The cateogry isn't valid. Return false.
alert('Please select a valid category');
confirming = false;
Expand Down

0 comments on commit 1c6b8bf

Please sign in to comment.