Skip to content

Fix Failing Save after Attempted Delete of Non-Existent Key (#29)#30

Open
brainiac-five wants to merge 2 commits intomasterfrom
fix/issue-29
Open

Fix Failing Save after Attempted Delete of Non-Existent Key (#29)#30
brainiac-five wants to merge 2 commits intomasterfrom
fix/issue-29

Conversation

@brainiac-five
Copy link
Copy Markdown
Collaborator

@brainiac-five brainiac-five commented Feb 27, 2026

Fix of failing save after attempt of deletion of non-existent key.

This PR makes PR #27 obsolete. The regression tests of #27 are also passing with the change of this PR:

if update != nil {
pm.n = update
}
return pm.n, nil

The approach in this PR tolerates nil being returned from ops Update() and prevents it from ending up in root at the above line. This catches two other cases in ops Update() beyond the one fixed in PR #27.

Note that the regression tests of #27 are not included in this PR to avoid confusion.

failing save after attempted deletion of non-existing key pair
@brainiac-five brainiac-five requested a review from zelig February 27, 2026 22:57
@brainiac-five brainiac-five changed the title Fix/issue 29 Fix Failing Save after Attempted Delete of Non-Existent Key (#29) Feb 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant