Skip to content
This repository was archived by the owner on Oct 22, 2025. It is now read-only.

Commit c48cb4b

Browse files
committed
fix(core): fix notifying onStateChange for non-state mutations to persisted state (#1208)
1 parent ccc9fd9 commit c48cb4b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/rivetkit/src/actor/instance.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -624,6 +624,10 @@ export class ActorInstance<
624624
target,
625625
// biome-ignore lint/suspicious/noExplicitAny: Don't know types in proxy
626626
(path: string, value: any, _previousValue: any, _applyData: any) => {
627+
if (path !== "state" && !path.startsWith("state.")) {
628+
return;
629+
}
630+
627631
let invalidPath = "";
628632
if (
629633
!isCborSerializable(

0 commit comments

Comments
 (0)