Skip to content

fix(components): equality check for uniqueErrors length#10684

Open
Rare-Programmer wants to merge 1 commit into
shadcn-ui:mainfrom
Rare-Programmer:fix/strict-equality-check
Open

fix(components): equality check for uniqueErrors length#10684
Rare-Programmer wants to merge 1 commit into
shadcn-ui:mainfrom
Rare-Programmer:fix/strict-equality-check

Conversation

@Rare-Programmer
Copy link
Copy Markdown

Summary

Replaced loose equality (==) with strict equality (===) when checking uniqueErrors.length.

Why

Using strict equality avoids implicit type coercion and keeps comparisons predictable and consistent with modern JavaScript/TypeScript best practices.

Changes

Before:

    if (uniqueErrors?.length == 1) {
      return uniqueErrors[0]?.message;
    }

After:

    if (uniqueErrors?.length === 1) {
      return uniqueErrors[0]?.message;
    }

Replaced loose equality (`==`) with strict equality (`===`) when checking `uniqueErrors.length`.
@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented May 17, 2026

@Rare-Programmer is attempting to deploy a commit to the shadcn-pro Team on Vercel.

A member of the Team first needs to authorize it.

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.

1 participant