Skip to content

Commit 01d9953

Browse files
committed
refactor
1 parent 4921123 commit 01d9953

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src/space.js

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,11 @@ export default class ColorSpace {
4545
format.name ||= name;
4646
}
4747

48-
if (options.cssId && !this.formats.color) {
49-
this.formats.color = { id: options.cssId };
50-
Object.defineProperty(this, "cssId", {value: options.cssId});
51-
}
52-
else if (!this.formats.color?.id) {
53-
this.formats.color = { ...this.formats.color ?? {}, id: this.id };
48+
if (!this.formats.color?.id) {
49+
this.formats.color = {
50+
...this.formats.color ?? {},
51+
id: options.cssId || this.id
52+
};
5453
}
5554

5655
// Gamut space

0 commit comments

Comments
 (0)