aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/components/lazyLoad.tsx
diff options
context:
space:
mode:
authorStas Vilchik <stas.vilchik@sonarsource.com>2018-07-04 13:38:11 +0200
committerSonarTech <sonartech@sonarsource.com>2018-07-04 20:21:55 +0200
commit6ff576fb1e0f8081121e1e7279c846927f98d68f (patch)
tree46b5efd74d445744a0b4a8f9964798b62e9c9d64 /server/sonar-web/src/main/js/components/lazyLoad.tsx
parent8afd9b61a5652bb47a654ea7d8d15a0aa2c88e3c (diff)
downloadsonarqube-6ff576fb1e0f8081121e1e7279c846927f98d68f.tar.gz
sonarqube-6ff576fb1e0f8081121e1e7279c846927f98d68f.zip
decrease initial amount of js (#462)
Diffstat (limited to 'server/sonar-web/src/main/js/components/lazyLoad.tsx')
-rw-r--r--server/sonar-web/src/main/js/components/lazyLoad.tsx3
1 files changed, 2 insertions, 1 deletions
diff --git a/server/sonar-web/src/main/js/components/lazyLoad.tsx b/server/sonar-web/src/main/js/components/lazyLoad.tsx
index 7043b40f440..2b4268bf08a 100644
--- a/server/sonar-web/src/main/js/components/lazyLoad.tsx
+++ b/server/sonar-web/src/main/js/components/lazyLoad.tsx
@@ -29,7 +29,7 @@ interface Loader<P> {
export const LAST_FAILED_CHUNK_STORAGE_KEY = 'sonarqube.last_failed_chunk';
-export function lazyLoad<P>(loader: Loader<P>) {
+export function lazyLoad<P>(loader: Loader<P>, displayName?: string) {
interface ImportError {
request?: string;
}
@@ -43,6 +43,7 @@ export function lazyLoad<P>(loader: Loader<P>) {
// and let the child component decide if it needs to change
return class LazyLoader extends React.Component<any, State> {
mounted = false;
+ static displayName = displayName;
state: State = {};
componentDidMount() {