]> source.dussan.org Git - sonarqube.git/commitdiff
Fix quality flaws
authorGrégoire Aubert <gregoire.aubert@sonarsource.com>
Mon, 23 Oct 2017 13:50:06 +0000 (15:50 +0200)
committerGrégoire Aubert <gregoire.aubert@sonarsource.com>
Mon, 23 Oct 2017 15:01:13 +0000 (08:01 -0700)
server/sonar-web/src/main/js/app/components/AdminContainer.tsx

index ea9c6f1301bf53f3c19d0540313cbb7a826acb41..12f2f691d8eb4bc17c77ffb72e9699f673e96eb3 100644 (file)
@@ -45,8 +45,9 @@ class AdminContainer extends React.PureComponent<Props> {
   componentDidMount() {
     if (!this.context.canAdmin) {
       // workaround cyclic dependencies
-      const handleRequiredAuthorization = require('../utils/handleRequiredAuthorization').default;
-      handleRequiredAuthorization();
+      import('../utils/handleRequiredAuthorization').then(handleRequredAuthorization =>
+        handleRequredAuthorization.default()
+      );
     } else {
       this.loadData();
     }