Skip to content

Commit 577f7ad

Browse files
authored
fix(clerk-js): Only log warning for dev instance (#7298)
1 parent f85abda commit 577f7ad

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.changeset/odd-books-win.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@clerk/clerk-js': patch
3+
---
4+
5+
Ensure that organization component warnings are only shown when no user session exists in development

packages/clerk-js/src/core/clerk.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -753,7 +753,7 @@ export class Clerk implements ClerkInterface {
753753
): __internal_AttemptToEnableEnvironmentSettingResult => {
754754
const { for: setting, caller } = params;
755755

756-
if (!this.user) {
756+
if (!this.user && this.#instanceType === 'development') {
757757
logger.warnOnce(
758758
`Clerk: "${caller}" requires an active user session. Ensure a user is signed in before executing ${caller}.`,
759759
);

0 commit comments

Comments
 (0)