Skip to content

projection bugfix #20

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

brenelz
Copy link

@brenelz brenelz commented Jun 16, 2025

I was getting this weird wrap is not a function error with projections.

My suspicion is that that wrap(v, node, wrapped) : was using the wrong wrap variable since they were named the same.

Thus to fix the issue called it a different name like innerWrap

@brenelz brenelz requested a review from ryansolid June 16, 2025 01:13
@@ -28,7 +28,7 @@ export function wrapProjection<T>(

function wrap(source, node, wrapped) {
if (wrapped.has(source)) return wrapped.get(source);
const wrap = new Proxy(source, {
const innerWrap = new Proxy(source, {
get(target, property) {
node.read();
const v = target[property];
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i believe the below wrap(v, node, wrapped) function call was using the proxy variable instead of the function itself

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant