jbilcke-hf HF staff commited on
Commit
1e7eef3
1 Parent(s): 3f55819

this is driving me crazy

Browse files
Files changed (1) hide show
  1. src/app/state/useCurrentUser.ts +2 -2
src/app/state/useCurrentUser.ts CHANGED
@@ -59,9 +59,9 @@ export function useCurrentUser({
59
  let huggingfaceTemporaryApiKey = localStorage.getItem(localStorageKeys.huggingfaceTemporaryApiKey) || ""
60
 
61
  console.log("huggingfaceTemporaryApiKey:", huggingfaceTemporaryApiKey)
62
- if (huggingfaceApiKey.startsWith('"')) {
63
  console.log("the key has been corrupted..")
64
- localStorage.setItem(localStorageKeys.huggingfaceTemporaryApiKey, JSON.parse(huggingfaceApiKey))
65
  huggingfaceTemporaryApiKey = localStorage.getItem(localStorageKeys.huggingfaceTemporaryApiKey) || ""
66
  console.log(`the recovered key is: ${huggingfaceTemporaryApiKey}`)
67
  }
 
59
  let huggingfaceTemporaryApiKey = localStorage.getItem(localStorageKeys.huggingfaceTemporaryApiKey) || ""
60
 
61
  console.log("huggingfaceTemporaryApiKey:", huggingfaceTemporaryApiKey)
62
+ if (huggingfaceTemporaryApiKey.startsWith('"')) {
63
  console.log("the key has been corrupted..")
64
+ localStorage.setItem(localStorageKeys.huggingfaceTemporaryApiKey, JSON.parse(huggingfaceTemporaryApiKey))
65
  huggingfaceTemporaryApiKey = localStorage.getItem(localStorageKeys.huggingfaceTemporaryApiKey) || ""
66
  console.log(`the recovered key is: ${huggingfaceTemporaryApiKey}`)
67
  }