From 1ff9a36af32b4b29e91b271f8d4b08bc8e3ff428 Mon Sep 17 00:00:00 2001 From: Dwindi Ramadhana Date: Sat, 10 Jan 2026 01:00:46 +0700 Subject: [PATCH] fix: React Router basename - use ?? instead of || for empty string support When SPA is frontpage, basePath is empty string. JavaScript || treats '' as falsy and falls back to /store. Changed to ?? (nullish coalescing) so empty string works. --- customer-spa/src/App.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/customer-spa/src/App.tsx b/customer-spa/src/App.tsx index b68d4bc..468cfd2 100644 --- a/customer-spa/src/App.tsx +++ b/customer-spa/src/App.tsx @@ -104,7 +104,7 @@ const getRouterConfig = () => { const config = (window as any).woonoowCustomer; return { useBrowserRouter: config?.useBrowserRouter ?? true, - basePath: config?.basePath || '/store', + basePath: config?.basePath ?? '/store', }; };