-
-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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
bugfix(common) allow classes as data parameter in createParamDecorato… #1562
bugfix(common) allow classes as data parameter in createParamDecorato… #1562
Conversation
Pull Request Test Coverage Report for Build 2021
💛 - Coveralls |
@@ -49,7 +49,8 @@ export function createParamDecorator( | |||
|
|||
const isPipe = pipe => | |||
pipe && | |||
((isFunction(pipe) && pipe.prototype) || isFunction(pipe.transform)); | |||
((isFunction(pipe) && pipe.prototype && isFunction(pipe.prototype.transform)) || |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible to add test for this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes it is 😃 I thought it may not be necessary for bugs. I'll add it, thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
Ping 🏓 |
@kamilmysliwiec Sorry for being late. I have updated PR with test. |
@kamilmysliwiec |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
PR Checklist
PR Type
What kind of change does this PR introduce?
What is the current behavior?
When we pass class type as data parameter to createParamDecorator function, it will be recognized as Pipe and data will be null in the factory. 😞
What is the new behavior?
We can pass classes as data parameter 😃
Does this PR introduce a breaking change?