},
renderSearchBox() {
- if (this.props.options.component) {
+ if (this.props.options && this.props.options.component) {
// do not render search form on the project-level page
return null;
}
},
renderFilter(task) {
- if (this.props.options.component) {
+ if (this.props.options && this.props.options.component) {
return null;
}
return <td className="thin nowrap">
it('should not render search form', () => {
let spy = sinon.spy();
- let component = TestUtils.renderIntoDocument(<Search options={{ componentId: 'ABCD' }}
+ let component = TestUtils.renderIntoDocument(<Search options={{ component: { id: 'ABCD' } }}
onStatusChange={spy}
onCurrentsChange={spy}
onDateChange={spy}/>),