Commit
·
6732e81
1
Parent(s):
ed8d376
Update index.js
Browse files
index.js
CHANGED
@@ -153,7 +153,7 @@ async function oauthLogin(opts) {
|
|
153 |
const redirectUri = opts?.redirectUri || window.location.href;
|
154 |
|
155 |
// @ts-expect-error window.huggingface is defined inside static Spaces.
|
156 |
-
const variables
|
157 |
|
158 |
const clientId = opts?.clientId || variables?.OAUTH_CLIENT_ID;
|
159 |
|
|
|
153 |
const redirectUri = opts?.redirectUri || window.location.href;
|
154 |
|
155 |
// @ts-expect-error window.huggingface is defined inside static Spaces.
|
156 |
+
const variables = window?.huggingface?.variables ?? null;
|
157 |
|
158 |
const clientId = opts?.clientId || variables?.OAUTH_CLIENT_ID;
|
159 |
|