File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
packages/nextjs/src/server Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ import type { TelemetryEventRaw } from '@clerk/types';
2
2
import { promises as fs } from 'fs' ;
3
3
import { dirname , join } from 'path' ;
4
4
5
+ import { canUseKeyless } from '../utils/feature-flags' ;
5
6
import { createClerkClientWithOptions } from './createClerkClient' ;
6
7
7
8
const EVENT_KEYLESS_ENV_DRIFT_DETECTED = 'KEYLESS_ENV_DRIFT_DETECTED' ;
@@ -86,6 +87,9 @@ async function tryMarkTelemetryEventAsFired(): Promise<boolean> {
86
87
* @returns Promise<void> - Function completes silently, errors are logged but don't throw
87
88
*/
88
89
export async function detectKeylessEnvDrift ( ) : Promise < void > {
90
+ if ( ! canUseKeyless ) {
91
+ return ;
92
+ }
89
93
// Only run on server side
90
94
if ( typeof window !== 'undefined' ) {
91
95
return ;
You can’t perform that action at this time.
0 commit comments