Skip to content

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

Copy link
Member

Choose a reason for hiding this comment

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

You are correct.. I am reworking this right now so I will keep this fix in mind.

Copy link
Author

Choose a reason for hiding this comment

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

So can probably just close this?

@brenelz brenelz closed this Jul 25, 2025
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.

2 participants