From c5d41dab80495fc7d44c1525ec42bf84be4cb2bc Mon Sep 17 00:00:00 2001 From: Prev Wong Date: Tue, 2 Apr 2024 16:02:17 +0800 Subject: [PATCH] fix(reka): history --- .changeset/metal-carrots-nail.md | 5 +++++ packages/core/src/history/manager-default.ts | 2 ++ 2 files changed, 7 insertions(+) create mode 100644 .changeset/metal-carrots-nail.md diff --git a/.changeset/metal-carrots-nail.md b/.changeset/metal-carrots-nail.md new file mode 100644 index 00000000..f582da2e --- /dev/null +++ b/.changeset/metal-carrots-nail.md @@ -0,0 +1,5 @@ +--- +'@rekajs/core': patch +--- + +Fix missing return statement in history operation diff --git a/packages/core/src/history/manager-default.ts b/packages/core/src/history/manager-default.ts index 2cb5470b..0f04b4b4 100644 --- a/packages/core/src/history/manager-default.ts +++ b/packages/core/src/history/manager-default.ts @@ -102,6 +102,7 @@ export class DefaultHistoryManager extends HistoryManager { if (change.type === 'update' && change.observableKind === 'array') { pathObj[change.index] = change.oldValue; + return; } if (change.type === 'splice') { @@ -133,6 +134,7 @@ export class DefaultHistoryManager extends HistoryManager { if (change.type === 'update' && change.observableKind === 'array') { pathObj[change.index] = change.newValue; + return; } if (change.type === 'splice') {