Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/gorgeous-pans-pump.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@clerk/clerk-js': patch
---

Use default value for `signIn.userData`. This will prevent the SignIn modal from breaking when an appearance prop is used in Next.js App Router.
2 changes: 1 addition & 1 deletion packages/clerk-js/src/core/resources/SignIn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export class SignIn extends BaseResource implements SignInResource {
secondFactorVerification: VerificationResource = new Verification(null);
identifier: string | null = null;
createdSessionId: string | null = null;
userData!: UserData;
userData: UserData = new UserData(null);

constructor(data: SignInJSON | null = null) {
super();
Expand Down
2 changes: 1 addition & 1 deletion packages/clerk-js/src/core/resources/UserData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export class UserData implements IUserData {
imageUrl?: string;
hasImage?: boolean;

constructor(data: UserDataJSON) {
constructor(data: UserDataJSON | null) {
this.fromJSON(data);
}

Expand Down