diff --git a/TableturfBattleClient/src/Pages/GamePage.ts b/TableturfBattleClient/src/Pages/GamePage.ts index 9c10e98..4b01bef 100644 --- a/TableturfBattleClient/src/Pages/GamePage.ts +++ b/TableturfBattleClient/src/Pages/GamePage.ts @@ -502,6 +502,11 @@ function testPlacementListItem_pointerleave(button: HTMLButtonElement, placement testUndoButton.buttonElement.addEventListener('click', () => { const turn = testPlacements.pop(); if (turn) { + // Remove the highlight if needed. + for (const p of turn.placementResults.placements[0].spacesAffected) + board.setTestHighlight(p.space.x, p.space.y, false); + + // Undo the placement. undoTurn(turn.placementResults); testPlacementList.removeChild(testPlacementList.firstChild!);