enzostvs HF staff commited on
Commit
62c9fe7
·
1 Parent(s): 4c7c347

hide banner

Browse files
Files changed (1) hide show
  1. src/routes/+layout.svelte +2 -1
src/routes/+layout.svelte CHANGED
@@ -28,7 +28,8 @@
28
  if (window.location.host === "enzostvs-lora-studio.hf.space") {
29
  window.location.href = "https://lorastudio.co";
30
  }
31
- if (window.location.host !== "huggingface.co") {
 
32
  init("enzostvs/lora-studio")
33
  }
34
  }
 
28
  if (window.location.host === "enzostvs-lora-studio.hf.space") {
29
  window.location.href = "https://lorastudio.co";
30
  }
31
+ const hasAncestorOrigin = Object.values(window.location.ancestorOrigins).some((origin) => origin.includes("huggingface.co"));
32
+ if (!hasAncestorOrigin) {
33
  init("enzostvs/lora-studio")
34
  }
35
  }