Skip to content

Commit

Permalink
Replace splice with index overwrite
Browse files Browse the repository at this point in the history
  • Loading branch information
blakeembrey committed Jan 17, 2024
1 parent 6c44065 commit bc88c2d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ export class Cache<T extends Container<any>> {

if (item.changeId !== prevItemChangeId) {
const index = this._keys.indexOf(id);
this.sheet.splice(index, 1, item.getStyles());
this.sheet[index] = item.getStyles();
this.changeId++;
if (this.changes) this.changes.change(item, index, index);
}
Expand Down

0 comments on commit bc88c2d

Please sign in to comment.