diff --git a/products/ASC.Files/Client/src/components/dialogs/ConnectDialog/index.js b/products/ASC.Files/Client/src/components/dialogs/ConnectDialog/index.js index d5f50ad3ff..d86000fbb8 100644 --- a/products/ASC.Files/Client/src/components/dialogs/ConnectDialog/index.js +++ b/products/ASC.Files/Client/src/components/dialogs/ConnectDialog/index.js @@ -106,15 +106,12 @@ const PureConnectDialogContainer = (props) => { const onChangeFolderName = (e) => setCustomerTitleValue(e.target.value); const onChangeMakeShared = (e) => setMakeShared(!isCorporate); - const isEmptyField = [ - urlValue, - loginValue, - passwordValue, - customerTitle, - ].some((el) => el.trim().length === 0); + const providerData = [customerTitle]; + if (!item.link) providerData.push(urlValue, loginValue, passwordValue); + const isEmptyField = providerData.some((el) => el.trim().length === 0); const onSave = () => { - //if (isEmptyField) return toastr.error(t("EmptyField")); + if (isEmptyField) return toastr.error(t("EmptyField")); onClose(); setIsLoading(true);