tsparticles 2.1.1 → 2.1.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.
@@ -4,7 +4,7 @@
4
4
  * Demo / Generator : https://particles.js.org/
5
5
  * GitHub : https://www.github.com/matteobruni/tsparticles
6
6
  * How to use? : Check the GitHub README
7
- * v2.1.1
7
+ * v2.1.2
8
8
  */
9
9
  (function webpackUniversalModuleDefinition(root, factory) {
10
10
  if(typeof exports === 'object' && typeof module === 'object')
@@ -15901,7 +15901,11 @@ class Linker extends ParticlesInteractorBase {
15901
15901
  clear() {}
15902
15902
 
15903
15903
  init() {
15904
- this.linkContainer.particles.linksColors = new Map();
15904
+ var _a;
15905
+
15906
+ if (!((_a = this.linkContainer) === null || _a === void 0 ? void 0 : _a.particles)) {
15907
+ this.linkContainer.particles.linksColors = new Map();
15908
+ }
15905
15909
  }
15906
15910
 
15907
15911
  async interact(p1) {
@@ -15958,6 +15962,12 @@ class Linker extends ParticlesInteractorBase {
15958
15962
  reset() {}
15959
15963
 
15960
15964
  setColor(p1) {
15965
+ var _a, _b;
15966
+
15967
+ if (!((_b = (_a = this.linkContainer) === null || _a === void 0 ? void 0 : _a.particles) === null || _b === void 0 ? void 0 : _b.linksColors)) {
15968
+ this.linkContainer.particles.linksColors = new Map();
15969
+ }
15970
+
15961
15971
  const container = this.linkContainer,
15962
15972
  linksOptions = p1.options.links;
15963
15973
  let linkColor = linksOptions.id === undefined ? container.particles.linksColor : container.particles.linksColors.get(linksOptions.id);