aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/apps/create/project
diff options
context:
space:
mode:
Diffstat (limited to 'server/sonar-web/src/main/js/apps/create/project')
-rw-r--r--server/sonar-web/src/main/js/apps/create/project/ManualProjectCreate.tsx6
1 files changed, 4 insertions, 2 deletions
diff --git a/server/sonar-web/src/main/js/apps/create/project/ManualProjectCreate.tsx b/server/sonar-web/src/main/js/apps/create/project/ManualProjectCreate.tsx
index b41e6afcb32..b497ed89ac4 100644
--- a/server/sonar-web/src/main/js/apps/create/project/ManualProjectCreate.tsx
+++ b/server/sonar-web/src/main/js/apps/create/project/ManualProjectCreate.tsx
@@ -57,6 +57,8 @@ interface State {
submitting: boolean;
}
+const DEBOUNCE_DELAY = 250;
+
type ValidState = State & Required<Pick<State, 'projectKey' | 'projectName'>>;
export default class ManualProjectCreate extends React.PureComponent<Props, State> {
@@ -74,7 +76,7 @@ export default class ManualProjectCreate extends React.PureComponent<Props, Stat
mainBranchNameTouched: false,
validatingProjectKey: false,
};
- this.checkFreeKey = debounce(this.checkFreeKey, 250);
+ this.checkFreeKey = debounce(this.checkFreeKey, DEBOUNCE_DELAY);
}
componentDidMount() {
@@ -97,7 +99,7 @@ export default class ManualProjectCreate extends React.PureComponent<Props, Stat
checkFreeKey = (key: string) => {
this.setState({ validatingProjectKey: true });
- return doesComponentExists({ component: key })
+ doesComponentExists({ component: key })
.then((alreadyExist) => {
if (this.mounted && key === this.state.projectKey) {
this.setState({