@ljhaesler/color-handler 1.0.1 → 1.0.3

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/index.js +6 -5
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -75,11 +75,12 @@ export class ColorHandler extends Map {
75
75
  }
76
76
 
77
77
  _trySync() {
78
- if (
79
- this._colors &&
80
- this._associations &&
81
- this._colors.length === this._associations.length
82
- ) {
78
+ if (this._colors && this._associations) {
79
+ if (this._colors.length !== this._associations.length) {
80
+ throw new Error(
81
+ `ColorHandler: sync skipped — ${this._colors.length} color set(s) but ${this._associations.length} association(s)`,
82
+ );
83
+ }
83
84
  this._sync();
84
85
  }
85
86
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ljhaesler/color-handler",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
4
4
  "description": "",
5
5
  "license": "ISC",
6
6
  "author": "ljhaesler",