fix: TS syntax in define:vars IIFEs causes SyntaxError — use plain JS for authUrl

This commit is contained in:
Davide Scaini
2026-06-03 22:03:21 +02:00
parent ac18b73c07
commit 3624fd051f
+2 -2
View File
@@ -592,7 +592,7 @@ try {
<!-- User widget: only needed for multi-user (single-user nav links are static) -->
{!singleHandle && (
<script define:vars={{ baseUrl }}>
const authUrl: string = (window as any).__bincioAuthUrl ?? '';
const authUrl = window.__bincioAuthUrl || '';
(async () => {
try {
const r = await fetch('/api/me', { credentials: 'include' });
@@ -734,7 +734,7 @@ try {
{editEnabled && (
<script define:vars={{ editUrl, baseUrl }}>
const authUrl: string = (window as any).__bincioAuthUrl ?? '';
const authUrl = window.__bincioAuthUrl || '';
const modal = document.getElementById('upload-modal');
const openBtn = document.getElementById('upload-btn');
const closeBtn = document.getElementById('upload-close');