Skip to content

Commit 5b4fcce

Browse files
committed
refactor: create a new scoped variable to avoid reassignment of function parameters (no-param-reassign)
1 parent 4ed5cf6 commit 5b4fcce

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/SupabaseClient.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,13 @@ export default class SupabaseClient {
5252
if (!supabaseUrl) throw new Error('supabaseUrl is required.')
5353
if (!supabaseKey) throw new Error('supabaseKey is required.')
5454

55-
supabaseUrl = stripTrailingSlash(supabaseUrl)
56-
55+
const _supabaseUrl = stripTrailingSlash(supabaseUrl)
5756
const settings = { ...DEFAULT_OPTIONS, ...options }
58-
this.restUrl = `${supabaseUrl}/rest/v1`
59-
this.realtimeUrl = `${supabaseUrl}/realtime/v1`.replace('http', 'ws')
60-
this.authUrl = `${supabaseUrl}/auth/v1`
61-
this.storageUrl = `${supabaseUrl}/storage/v1`
57+
58+
this.restUrl = `${_supabaseUrl}/rest/v1`
59+
this.realtimeUrl = `${_supabaseUrl}/realtime/v1`.replace('http', 'ws')
60+
this.authUrl = `${_supabaseUrl}/auth/v1`
61+
this.storageUrl = `${_supabaseUrl}/storage/v1`
6262
this.schema = settings.schema
6363

6464
this.auth = this._initSupabaseAuthClient(settings)

0 commit comments

Comments
 (0)