diff options
Diffstat (limited to 'server/sonar-web')
3 files changed, 3 insertions, 3 deletions
diff --git a/server/sonar-web/src/main/js/apps/background-tasks/search.js b/server/sonar-web/src/main/js/apps/background-tasks/search.js index 92f9cc5d1a8..5d122b614ab 100644 --- a/server/sonar-web/src/main/js/apps/background-tasks/search.js +++ b/server/sonar-web/src/main/js/apps/background-tasks/search.js @@ -94,7 +94,7 @@ export default React.createClass({ }, 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; } diff --git a/server/sonar-web/src/main/js/apps/background-tasks/tasks.js b/server/sonar-web/src/main/js/apps/background-tasks/tasks.js index ffd4af2782d..54b05fa0eed 100644 --- a/server/sonar-web/src/main/js/apps/background-tasks/tasks.js +++ b/server/sonar-web/src/main/js/apps/background-tasks/tasks.js @@ -93,7 +93,7 @@ export default React.createClass({ }, renderFilter(task) { - if (this.props.options.component) { + if (this.props.options && this.props.options.component) { return null; } return <td className="thin nowrap"> diff --git a/server/sonar-web/tests/apps/background-tasks-test.js b/server/sonar-web/tests/apps/background-tasks-test.js index 15ac381e2a0..9bc486c7d63 100644 --- a/server/sonar-web/tests/apps/background-tasks-test.js +++ b/server/sonar-web/tests/apps/background-tasks-test.js @@ -49,7 +49,7 @@ describe('Background Tasks', function () { 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}/>), |