diff --git a/js/chess.js b/js/chess.js index 777f547..b23959e 100644 --- a/js/chess.js +++ b/js/chess.js @@ -573,10 +573,12 @@ function switchGameId(newId){ const board = JSON.parse(d['board']); const cb_board = $('#cb_board').first(); if ($('#cb_notify')[0].checked && cb_board.data('skip_notify') !== d['board']) { - if (board['move'] && board['move']['took'] === 'k') { - notify((board['move']['side'][0] === 'd' ? 'Dark' : 'Light') + ' player won!'); - } else { - notify((board['player'][0] === 'd' ? 'Dark' : 'Light') + ' player\'s turn'); + if (!board['phantom']) { + if (board['move'] && board['move']['took'] === 'k') { + notify((board['move']['side'][0] === 'd' ? 'Dark' : 'Light') + ' player won!'); + } else { + notify((board['player'][0] === 'd' ? 'Dark' : 'Light') + ' player\'s turn'); + } } } $('#cb_board').data('skip_notify', d['board']);