Continue debug attempt for move update on server
[vchess.git] / client / src / variants / Allmate2.js
index 0e515b2..fe5e98c 100644 (file)
@@ -295,7 +295,7 @@ export const VariantRules = class Allmate2Rules extends ChessRules {
     let notation = super.getNotation(move);
     // Add a capture mark (not describing what is captured...):
     if (move.vanish.length > 1 && move.appear.length == 1) {
-      if (notation.match(/^[a-h]x/))
+      if (!!(notation.match(/^[a-h]x/)))
         // Pawn capture: remove initial "b" in bxc4 for example
         notation = notation.substr(1);
       notation = notation.replace("x","") + "X";