Skip to content

Save empty username#509

Open
muhin-g-s wants to merge 1 commit into
Ajaxy:masterfrom
muhin-g-s:fix/clear-username-503
Open

Save empty username#509
muhin-g-s wants to merge 1 commit into
Ajaxy:masterfrom
muhin-g-s:fix/clear-username-503

Conversation

@muhin-g-s

Copy link
Copy Markdown

Fixes #503

Problem:
In the desktop/mobile client, you can clear the username field and save, and the user's username gets removed. In the web client this doesn't work

Cause:
In the settings save handler there was a check like if (!editableUsername) return, but this isn't quite correct, since editableUsername can be not only false, but also

Fix:
A stricter check editableUsername === false

How to test:

  1. open the settings modal
  2. enter an empty string instead of the username
  3. save

Expected behavior:

  • the username field is empty
  • when reopening the settings modal, the username field is absent

@netlify

netlify Bot commented May 1, 2026

Copy link
Copy Markdown

👷 Deploy request for telegram-tt-previews pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit dcd1837

@albertoblue87-netizen albertoblue87-netizen left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Username is not cleared or deleted

2 participants