diff options
author | Grégoire Aubert <gregoire.aubert@sonarsource.com> | 2018-10-10 10:33:04 +0200 |
---|---|---|
committer | SonarTech <sonartech@sonarsource.com> | 2018-10-11 15:14:33 +0200 |
commit | 6bfe9d0120c8b6c3c522476b0ee95c9a54491145 (patch) | |
tree | 739241ed058fb05e74c1329032f39a1e6edc28c9 /server/sonar-web/src/main/js/apps/about | |
parent | 96ec2c5fe19cd8d5801bf833f8e384055422ae7d (diff) | |
download | sonarqube-6bfe9d0120c8b6c3c522476b0ee95c9a54491145.tar.gz sonarqube-6bfe9d0120c8b6c3c522476b0ee95c9a54491145.zip |
Update TS to 3.1.2
Diffstat (limited to 'server/sonar-web/src/main/js/apps/about')
-rw-r--r-- | server/sonar-web/src/main/js/apps/about/components/AboutApp.tsx | 8 | ||||
-rw-r--r-- | server/sonar-web/src/main/js/apps/about/sonarcloud/SonarCloudPage.tsx | 8 |
2 files changed, 12 insertions, 4 deletions
diff --git a/server/sonar-web/src/main/js/apps/about/components/AboutApp.tsx b/server/sonar-web/src/main/js/apps/about/components/AboutApp.tsx index 40737d5408e..6771f875ffe 100644 --- a/server/sonar-web/src/main/js/apps/about/components/AboutApp.tsx +++ b/server/sonar-web/src/main/js/apps/about/components/AboutApp.tsx @@ -71,13 +71,17 @@ class AboutApp extends React.PureComponent<Props, State> { this.mounted = true; this.loadData(); document.body.classList.add('white-page'); - document.documentElement.classList.add('white-page'); + if (document.documentElement) { + document.documentElement.classList.add('white-page'); + } } componentWillUnmount() { this.mounted = false; document.body.classList.remove('white-page'); - document.documentElement.classList.remove('white-page'); + if (document.documentElement) { + document.documentElement.classList.remove('white-page'); + } } loadProjects() { diff --git a/server/sonar-web/src/main/js/apps/about/sonarcloud/SonarCloudPage.tsx b/server/sonar-web/src/main/js/apps/about/sonarcloud/SonarCloudPage.tsx index 04e14901929..3608dbd79eb 100644 --- a/server/sonar-web/src/main/js/apps/about/sonarcloud/SonarCloudPage.tsx +++ b/server/sonar-web/src/main/js/apps/about/sonarcloud/SonarCloudPage.tsx @@ -38,12 +38,16 @@ type Props = StateProps & WithRouterProps & OwnProps; class SonarCloudPage extends React.Component<Props> { componentDidMount() { - document.documentElement.classList.add('white-page'); + if (document.documentElement) { + document.documentElement.classList.add('white-page'); + } document.body.classList.add('white-page'); } componentWillUnmount() { - document.documentElement.classList.remove('white-page'); + if (document.documentElement) { + document.documentElement.classList.remove('white-page'); + } document.body.classList.remove('white-page'); } |