From acb8dfb758a3a7632bfcea8829d372252f791bc6 Mon Sep 17 00:00:00 2001 From: Blake Embrey Date: Wed, 17 Jan 2024 15:19:39 -0500 Subject: [PATCH] Overwrite index on removal --- src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index bccab10..df92a6a 100644 --- a/src/index.ts +++ b/src/index.ts @@ -356,7 +356,7 @@ export class Cache> { item.unmerge(style); if (item.changeId !== prevChangeId) { - this.sheet.splice(index, 1, item.getStyles()); + this.sheet[index] = item.getStyles(); this.changeId++; if (this.changes) this.changes.change(item, index, index); }