From 12b2db2c21095b2ccf1cdd51f98436c095733f8b Mon Sep 17 00:00:00 2001 From: Bryce Kalow Date: Thu, 30 Nov 2023 10:28:47 +0200 Subject: [PATCH] fix(clerk-js): Add setter for sdkMetadata to address error (#2237) * fix(clerk-js): Add setter for sdkMetadata to address error * chore(repo): Add changeset (cherry picked from commit 0551488fb67fc6ec117e8d19796094c4601013d2) --- .changeset/young-experts-attack.md | 5 +++++ packages/clerk-js/src/core/clerk.ts | 4 ++++ 2 files changed, 9 insertions(+) create mode 100644 .changeset/young-experts-attack.md diff --git a/.changeset/young-experts-attack.md b/.changeset/young-experts-attack.md new file mode 100644 index 0000000000..819f8dfd8b --- /dev/null +++ b/.changeset/young-experts-attack.md @@ -0,0 +1,5 @@ +--- +'@clerk/clerk-js': patch +--- + +Add setter for sdkMetadata on Clerk to address issues arising from older versions of the SDK. diff --git a/packages/clerk-js/src/core/clerk.ts b/packages/clerk-js/src/core/clerk.ts index 59e5b219f8..d32f70291d 100644 --- a/packages/clerk-js/src/core/clerk.ts +++ b/packages/clerk-js/src/core/clerk.ts @@ -191,6 +191,10 @@ export default class Clerk implements ClerkInterface { return Clerk.version; } + set sdkMetadata(metadata: SDKMetadata) { + Clerk.sdkMetadata = metadata; + } + get sdkMetadata(): SDKMetadata { return Clerk.sdkMetadata; }