Some fixes + draft newmove pingback logic (unfinished, not working)
[vchess.git] / client / src / components / BaseGame.vue
index 0c20b0b..3c14a7f 100644 (file)
@@ -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();