Skip to content

Commit

Permalink
build: fix internal type error
Browse files Browse the repository at this point in the history
  • Loading branch information
AlansCodeLog committed Sep 15, 2024
1 parent 0fa4ea8 commit 3d04d79
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export class Theme<TValues extends Record<string, InterpolatedVars<any> | Contro

protected _add(key: string, value: InterpolatedVars<any> | ControlVar<any, any>): void {
if (this.value[key]) throw new Error(`Key ${key} already exists in theme. Use set to change the value.`)
if (this.ready) { this.value[key]?.removeDep(this) }
if (this.ready) { this.value[key as keyof TValues]?.removeDep(this) }

this.value[key as keyof TValues] = value as TValues[keyof TValues]

Expand Down

0 comments on commit 3d04d79

Please sign in to comment.