pgn-manager 2.2.1 → 2.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +1 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -316,7 +316,7 @@ class PGNManager {
316
316
  comments: [],
317
317
  };
318
318
  // 4) Insert into structure & flag first‐of‐variation
319
- let isFirstOfVariation = false;
319
+ let isFirstOfVariation = !current;
320
320
  if (!current) {
321
321
  // brand-new mainline => variation of first move if exists
322
322
  const first = parentRav.moves[0];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pgn-manager",
3
- "version": "2.2.1",
3
+ "version": "2.2.2",
4
4
  "description": "Libraray built on top of chess.js and pgn-parser to load and process PGN files in typescript.",
5
5
  "main": "dist/index",
6
6
  "typings": "dist/index",