X-Git-Url: https://git.auder.net/?p=vchess.git;a=blobdiff_plain;f=client%2Fsrc%2Fcomponents%2FBaseGame.vue;h=0c20b0bc20fcf1a32f41c32076c1d453af8d254a;hp=4af4e1536884e3105f6359f360dd5b33670581ca;hb=efdfb4c70f4a4391b8571726d924cdf58baba41c;hpb=421bdcd4dfe845a4714416606e72e086e7860e2b diff --git a/client/src/components/BaseGame.vue b/client/src/components/BaseGame.vue index 4af4e153..0c20b0bc 100644 --- a/client/src/components/BaseGame.vue +++ b/client/src/components/BaseGame.vue @@ -284,6 +284,9 @@ export default { let movingPiece = document.querySelector( "#" + getSquareId(move.start) + " > img.piece" ); + // For some unknown reasons Opera get "movingPiece == null" error + // TOOO: is it calling 'animate()' twice ? One extra time ? + if (!movingPiece) return; // HACK for animation (with positive translate, image slides "under background") // Possible improvement: just alter squares on the piece's way... const squares = document.getElementsByClassName("board");