Skip to content

Commit

Permalink
Ensure coord meta always includes a coord name, even when the same as…
Browse files Browse the repository at this point in the history
… the key
  • Loading branch information
LeaVerou committed Apr 21, 2023
1 parent 64430d9 commit dd129cd
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/space.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ export default class ColorSpace {
// Coordinate metadata

let coords = options.coords ?? this.base.coords;

for (let name in coords) {
if (!(name in coords[name])) {
coords[name].name = name;
}
}
this.coords = coords;

// White point
Expand Down

0 comments on commit dd129cd

Please sign in to comment.