cm-chessboard 7.2.4 → 7.2.5

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cm-chessboard",
3
- "version": "7.2.4",
3
+ "version": "7.2.5",
4
4
  "description": "A JavaScript chessboard which is lightweight, ES6 module based, responsive, SVG rendered and without dependencies.",
5
5
  "keywords": [
6
6
  "chess",
@@ -101,11 +101,10 @@ export class VisualMoveInput {
101
101
  } else {
102
102
  throw Error("4b74af")
103
103
  }
104
- if(this.contextMenuListener) {
105
- throw Error("bd272c")
104
+ if(!this.contextMenuListener) {
105
+ this.contextMenuListener = this.onContextMenu.bind(this)
106
+ addEventListener("contextmenu", this.contextMenuListener)
106
107
  }
107
- this.contextMenuListener = this.onContextMenu.bind(this)
108
- addEventListener("contextmenu", this.contextMenuListener)
109
108
  } else {
110
109
  throw Error("94ad0c")
111
110
  }