-
-
Notifications
You must be signed in to change notification settings - Fork 91
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
[core] version 4.1.0 has a different behavior from 4.0.0 when using mapWith
#306
Comments
As you said @micalevisk , the behavior has changed and the selector method will be called with a proxy object as a parameter to determine the path during mapping creation. The error happened because the parameter passed to the selector is an empty proxy object it’s usage should be limited only to return the path. For your case I think you should use |
hey @AliYusuf95 I've tried to use mapper/packages/nestjs-integration-test/src/app/profiles/user-profile.profile.ts Lines 27 to 30 in 4fe0f45
|
Hi! After upgrading from
4.0.0
to4.1.0
(which introduces the feat #301) I'm facing this error:Looks like this is due to the usage of the
mapWith
selector.What I've notice is that now the second arg (a callback) passed to
mapWith
is not lazy anymore, this is why I'm getting that error.You can see that by following the steps bellow.
I'm not sure if that callback is expected to run only when performing the mapping tho.
You can use the test suite in your
main
branchthe new content of
user-profile.profile.ts
the new content of
user.profile.spec.ts
You should see nothing printing out. But
now you see the message
Log from inside mapWith's second arg
My use case is pretty much this:
maybe I could do this same mapping in another way...
The text was updated successfully, but these errors were encountered: