-
Notifications
You must be signed in to change notification settings - Fork 3
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
Sandbox transforms arrays to objects on the sandbox boundary #16
Comments
@Vratislav I don't think this is a Superface issue, from the map it seems that nothing is done with the |
I do not know, where exactly the problem is, but the behaviour is unexpected. If I receive |
Huh, that's strange. I can replicate with doing this in the map: |
Maybe linked to: patriksimek/vm2#198 |
The minimalistic replication is
Output is: |
I am just thinking whether JSON.stringify and then JSON.parse on the result after the sandbox boundary would be a good workaround or not. |
Can you please specify your I managed to reproduce On node |
My node is v12.4.0. I will try to update to the latest LTS |
I am still replicating this with:
|
But i can only replicate it as part of map walkthrough. If I do a test on the sandbox itself, such as:
I cannot replicate it either |
Cannot it be the
in the map-interpreter.ts ? It seems to me that everything it touches, it objectifies. |
I've created a branch and a PR where I added the You can see the debug output by setting environment variable I also added a test which should test your theory with |
It looks like your |
i still can't reproduce, try the version upgrade (superface needs typescript > 4, i'm surprised it works at all). it definitely seems linked to the vm though |
Fixed by #27 |
This issue seems to be reintroduced in vm2: patriksimek/vm2#198 |
Behavior
given profile snippet
and given map snippet
result.value.activities
contains Dictionary instead of Array (Array indicies are used as keys)Expected behaviour
I expected
result.value.activities
to contain array(But maybe I am wrong and the map implicitly dictates conversion to Dictionary in this case?)
The text was updated successfully, but these errors were encountered: