resources = target.parentObj.resources;
}
for (var i=0; i<resources.length; i++) {
- YAHOO.util.Dom.setStyle(resources[i].getEl().id, 'border', 'none');
+ if (resources[i].getEl() != null) {
+ YAHOO.util.Dom.setStyle(resources[i].getEl().id, 'border', 'none');
+ }
}
}
} else if (target.is == 'section' && target.resources.length > 0) {
// We need to have a border at the bottom of the last activity in
// that section.
- YAHOO.util.Dom.setStyle(target.resources[target.resources.length - 1].getEl().id,
+ if (target.resources[target.resources.length - 1].getEl() != null) {
+ YAHOO.util.Dom.setStyle(target.resources[target.resources.length - 1].getEl().id,
'border-bottom', '1px solid #BBB');
+ }
}
}