Skip to content

Commit 952f87c

Browse files
committed
fix: forbid saving new community name if it has errors
1 parent ebdf619 commit 952f87c

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

ts/components/dialog/UpdateConversationDetailsDialog.tsx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ export function UpdateConversationDetailsDialog(props: WithConvoId) {
143143
}
144144

145145
function onClickOK() {
146-
if (isNameChangePending) {
146+
if (!!errorStringName || !!errorStringDescription || isNameChangePending) {
147147
return;
148148
}
149149

@@ -241,7 +241,13 @@ export function UpdateConversationDetailsDialog(props: WithConvoId) {
241241
text={tr('save')}
242242
onClick={onClickOK}
243243
buttonType={SessionButtonType.Simple}
244-
disabled={isNameChangePending || !newName?.trim() || (noChanges && !avatarWasUpdated)}
244+
disabled={
245+
!!errorStringName ||
246+
!!errorStringDescription ||
247+
isNameChangePending ||
248+
!newName?.trim() ||
249+
(noChanges && !avatarWasUpdated)
250+
}
245251
/>
246252
{!avatarWasUpdated ? (
247253
<SessionButton

0 commit comments

Comments
 (0)