Fix: Verwende gameState.isSolved/isFailed direkt für Ergebnisanzeige
- Entferne Fallback auf hasWon/hasLost States - isSolved/isFailed werden jetzt direkt aus gameState gelesen - Boolean() Konvertierung für explizite Typ-Sicherheit - Behebt Problem, dass Ergebnisanzeige bei zurückkehrenden Rätseln nicht angezeigt wurde
This commit is contained in:
@@ -169,8 +169,10 @@ export default function Game({ dailyPuzzle, genre = null, isSpecial = false, max
|
||||
if (!gameState) return <div>{t('loadingState')}</div>;
|
||||
|
||||
// Use gameState directly for isSolved/isFailed to ensure consistency when returning to completed puzzles
|
||||
const isSolved = gameState?.isSolved ?? hasWon;
|
||||
const isFailed = gameState?.isFailed ?? hasLost;
|
||||
// Always use gameState values directly - they are the source of truth
|
||||
// This ensures that when returning to a completed puzzle, the result is shown immediately
|
||||
const isSolved = Boolean(gameState.isSolved);
|
||||
const isFailed = Boolean(gameState.isFailed);
|
||||
|
||||
const handleGuess = (song: any) => {
|
||||
if (isProcessingGuess) return;
|
||||
|
||||
Reference in New Issue
Block a user