[MM-51406] Update node-abi, fix some server modal bugs (#2617)
* Update node-abi so tests can run * [MM-51392] Fix modal ping bugs
This commit is contained in:
@@ -76,16 +76,16 @@ function ConfigureServer({
|
||||
if (urlUtils.startsWithProtocol(checkURL)) {
|
||||
return Promise.resolve(checkURL);
|
||||
}
|
||||
return window.desktop.modals.pingDomain(checkURL).then((result: string | Error) => {
|
||||
let newURL = checkURL;
|
||||
if (result instanceof Error) {
|
||||
console.error(`Could not ping url: ${checkURL}`);
|
||||
} else {
|
||||
newURL = `${result}://${checkURL}`;
|
||||
return window.desktop.modals.pingDomain(checkURL).
|
||||
then((result: string) => {
|
||||
const newURL = `${result}://${checkURL}`;
|
||||
setUrl(newURL);
|
||||
}
|
||||
return newURL;
|
||||
});
|
||||
return newURL;
|
||||
}).
|
||||
catch(() => {
|
||||
console.error(`Could not ping url: ${checkURL}`);
|
||||
return checkURL;
|
||||
});
|
||||
};
|
||||
|
||||
const validateName = () => {
|
||||
|
@@ -156,13 +156,13 @@ class NewTeamModal extends React.PureComponent<Props, State> {
|
||||
return Promise.resolve(undefined);
|
||||
}
|
||||
|
||||
return window.desktop.modals.pingDomain(teamUrl).then((result: string | Error) => {
|
||||
if (result instanceof Error) {
|
||||
console.error(`Could not ping url: ${teamUrl}`);
|
||||
} else {
|
||||
return window.desktop.modals.pingDomain(teamUrl).
|
||||
then((result: string) => {
|
||||
this.setState({teamUrl: `${result}://${this.state.teamUrl}`});
|
||||
}
|
||||
});
|
||||
}).
|
||||
catch(() => {
|
||||
console.error(`Could not ping url: ${teamUrl}`);
|
||||
});
|
||||
}
|
||||
|
||||
getError() {
|
||||
|
Reference in New Issue
Block a user