From a4452aee945faad4d2fcf0eaedbb055a2be47791 Mon Sep 17 00:00:00 2001 From: Pax1601 Date: Sat, 7 Dec 2024 16:34:00 +0100 Subject: [PATCH] fix: Units are spawned at 0,0 --- frontend/react/src/ui/panels/unitspawnmenu.tsx | 2 +- frontend/server/src/app.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/react/src/ui/panels/unitspawnmenu.tsx b/frontend/react/src/ui/panels/unitspawnmenu.tsx index 6516349a..413944a9 100644 --- a/frontend/react/src/ui/panels/unitspawnmenu.tsx +++ b/frontend/react/src/ui/panels/unitspawnmenu.tsx @@ -69,7 +69,7 @@ export function UnitSpawnMenu(props: { const setSpawnRequestTableCallback = useCallback(() => { if (spawnRequestTable) { /* Refresh the unique key identified */ - const tempTable = {...spawnRequestTable} as any; + const tempTable = JSON.parse(JSON.stringify(spawnRequestTable)); delete tempTable.quickAccessName; delete tempTable.unit.location; delete tempTable.unit.altitude; diff --git a/frontend/server/src/app.ts b/frontend/server/src/app.ts index 41634507..8dd8c3d6 100644 --- a/frontend/server/src/app.ts +++ b/frontend/server/src/app.ts @@ -238,7 +238,7 @@ module.exports = function (configLocation, viteProxy) { /* Set default index */ if (viteProxy) { app.use( - "/vite", + "/", httpProxyMiddleware.createProxyMiddleware({ target: `http://localhost:8080/`, ws: true,