@@ -67,13 +67,13 @@ export default class SupabaseClient<
67
67
* Create a new client for use in the browser.
68
68
* @param supabaseUrl The unique Supabase URL which is supplied when you create a new project in your project dashboard.
69
69
* @param supabaseKey The unique Supabase Key which is supplied when you create a new project in your project dashboard.
70
- * @param options.schema You can switch in between schemas. The schema needs to be on the list of exposed schemas inside Supabase.
71
- * @param options.autoRefreshToken Set to "true" if you want to automatically refresh the token before expiring.
72
- * @param options.persistSession Set to "true" if you want to automatically save the user session into local storage.
73
- * @param options.detectSessionInUrl Set to "true" if you want to automatically detects OAuth grants in the URL and signs in the user.
74
- * @param options.headers Any additional headers to send with each network request.
70
+ * @param options.db.schema You can switch in between schemas. The schema needs to be on the list of exposed schemas inside Supabase.
71
+ * @param options.auth.autoRefreshToken Set to "true" if you want to automatically refresh the token before expiring.
72
+ * @param options.auth.persistSession Set to "true" if you want to automatically save the user session into local storage.
73
+ * @param options.auth.detectSessionInUrl Set to "true" if you want to automatically detects OAuth grants in the URL and signs in the user.
75
74
* @param options.realtime Options passed along to realtime-js constructor.
76
- * @param options.fetch A custom fetch implementation.
75
+ * @param options.global.fetch A custom fetch implementation.
76
+ * @param options.global.headers Any additional headers to send with each network request.
77
77
*/
78
78
constructor (
79
79
protected supabaseUrl : string ,
@@ -105,13 +105,13 @@ export default class SupabaseClient<
105
105
global : DEFAULT_GLOBAL_OPTIONS ,
106
106
}
107
107
108
- const settings = applySettingDefaults ( options || { } , DEFAULTS )
108
+ const settings = applySettingDefaults ( options ?? { } , DEFAULTS )
109
109
110
110
this . storageKey = settings . auth ?. storageKey ?? ''
111
111
this . headers = settings . global ?. headers ?? { }
112
112
113
113
this . auth = this . _initSupabaseAuthClient (
114
- settings ? .auth || { } ,
114
+ settings . auth ?? { } ,
115
115
this . headers ,
116
116
settings . global ?. fetch
117
117
)
0 commit comments