X-Git-Url: https://git.auder.net/?p=vchess.git;a=blobdiff_plain;f=client%2Fsrc%2Fcomponents%2FBaseGame.vue;h=3c14a7fd08c4d436d1ce9d28f630b0f742dbfeac;hp=0c20b0bc20fcf1a32f41c32076c1d453af8d254a;hb=f9c36b2da005b596ad656f4b6cc4e09ef3c656f1;hpb=8d1fcc37a933554e13bc996b5611f8307a4701e8 diff --git a/client/src/components/BaseGame.vue b/client/src/components/BaseGame.vue index 0c20b0bc..3c14a7fd 100644 --- a/client/src/components/BaseGame.vue +++ b/client/src/components/BaseGame.vue @@ -274,6 +274,7 @@ export default { // Animate an elementary move animateMove: function(move, callback) { let startSquare = document.getElementById(getSquareId(move.start)); + if (!startSquare) return; //shouldn't happen but... let endSquare = document.getElementById(getSquareId(move.end)); let rectStart = startSquare.getBoundingClientRect(); let rectEnd = endSquare.getBoundingClientRect();