Skip to content

Commit

Permalink
fixed glitch where JS failed if there was no suppression present
Browse files Browse the repository at this point in the history
  • Loading branch information
phillipgray committed Jun 2, 2011
1 parent 4ea84b2 commit 6c7c3a3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions assets/fieldsuppressor.sections.js
Expand Up @@ -36,8 +36,10 @@

template = field_template.clone();

if(data[field_id]['suppress'] == 'yes') {
template.find('input').attr('checked', 'checked');
if(data != undefined) {
if(data[field_id]['suppress'] == 'yes') {
template.find('input').attr('checked', 'checked');
}
}

template.find('input').attr({name: 'fields[' + i + '][fieldsuppressor]'})
Expand Down

0 comments on commit 6c7c3a3

Please sign in to comment.