aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/apps/web-api/components
diff options
context:
space:
mode:
authorStas Vilchik <stas-vilchik@users.noreply.github.com>2017-03-24 10:01:05 +0100
committerGitHub <noreply@github.com>2017-03-24 10:01:05 +0100
commitc066c9818690903ca656e33060d4d77f36cbdc5b (patch)
tree2a29d528d46f14b62aed5ec2833b81f1e3474661 /server/sonar-web/src/main/js/apps/web-api/components
parent70d52b56bb19ef9725b3cb598563e6684bc3327a (diff)
downloadsonarqube-c066c9818690903ca656e33060d4d77f36cbdc5b.tar.gz
sonarqube-c066c9818690903ca656e33060d4d77f36cbdc5b.zip
add flow-typed definitions (#1847)
Diffstat (limited to 'server/sonar-web/src/main/js/apps/web-api/components')
-rw-r--r--server/sonar-web/src/main/js/apps/web-api/components/WebApiApp.js10
1 files changed, 8 insertions, 2 deletions
diff --git a/server/sonar-web/src/main/js/apps/web-api/components/WebApiApp.js b/server/sonar-web/src/main/js/apps/web-api/components/WebApiApp.js
index 162c0a2c952..cda4b87b5e2 100644
--- a/server/sonar-web/src/main/js/apps/web-api/components/WebApiApp.js
+++ b/server/sonar-web/src/main/js/apps/web-api/components/WebApiApp.js
@@ -49,7 +49,10 @@ export default class WebApiApp extends React.PureComponent {
this.mounted = true;
this.scrollToAction = this.scrollToAction.bind(this);
this.fetchList();
- document.getElementById('footer').classList.add('search-navigator-footer');
+ const footer = document.getElementById('footer');
+ if (footer) {
+ footer.classList.add('search-navigator-footer');
+ }
}
componentDidUpdate() {
@@ -59,7 +62,10 @@ export default class WebApiApp extends React.PureComponent {
componentWillUnmount() {
this.mounted = false;
- document.getElementById('footer').classList.remove('search-navigator-footer');
+ const footer = document.getElementById('footer');
+ if (footer) {
+ footer.classList.remove('search-navigator-footer');
+ }
}
fetchList(cb?: () => void) {