Skip to content
This repository was archived by the owner on May 4, 2024. It is now read-only.

fix: use jsonClone to fix cache layer#174

Merged
wraithgar merged 2 commits intonpm:mainfrom
antongolub:fix-cache-layer
May 3, 2023
Merged

fix: use jsonClone to fix cache layer#174
wraithgar merged 2 commits intonpm:mainfrom
antongolub:fix-cache-layer

Conversation

@antongolub
Copy link
Copy Markdown
Contributor

@antongolub antongolub commented May 2, 2023

What / Why

Some objects may get corrupted during caching
UPD Finally figured out that the cache does not work at all

Actual impl

52ad4c5

newobj[kk] = jsonClone[kk] // refers to `jsonClone` helper field instead of the origin obj

Expected

newobj[kk] = jsonClone(obj[kk])

@antongolub antongolub requested a review from a team as a code owner May 2, 2023 18:54
@antongolub antongolub requested a review from nlf May 2, 2023 18:54
@wraithgar
Copy link
Copy Markdown
Contributor

Is there any way to reliably test this?

@wraithgar wraithgar requested review from wraithgar and removed request for nlf May 2, 2023 19:59
@wraithgar wraithgar self-assigned this May 2, 2023
@antongolub
Copy link
Copy Markdown
Contributor Author

Sure. I'll add a test a bit later

@wraithgar wraithgar changed the title fix: fix jsonClone to fix cache layer fix: use jsonClone to fix cache layer May 3, 2023
@wraithgar wraithgar merged commit 7b516f1 into npm:main May 3, 2023
@github-actions github-actions Bot mentioned this pull request May 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants