Skip to content

Commit

Permalink
Add comment to explain usage spread syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
christoph-pflueger committed May 17, 2023
1 parent 92559c6 commit 08b011d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/pages/workspace/WorkspaceSettingsPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ function WorkspaceSettingsPage(props) {
if (!name || !name.length) {
errors.name = nameIsRequiredError;
} else if ([...name].length > CONST.WORKSPACE_NAME_CHARACTER_LIMIT) {
// Uses the spread syntax to count the number of Unicode code points instead of the number of UTF-16
// code units.
errors.name = nameIsTooLongError;
}

Expand Down

0 comments on commit 08b011d

Please sign in to comment.