-
Notifications
You must be signed in to change notification settings - Fork 78
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
add support for nested results property #64
base: master
Are you sure you want to change the base?
add support for nested results property #64
Conversation
Pull Request Test Coverage Report for Build 63
💛 - Coveralls |
@@ -301,8 +302,21 @@ export default { | |||
* @return {Array} | |||
*/ | |||
setResults (response) { | |||
if (this.resultsProperty && response[this.resultsProperty]) { | |||
return response[this.resultsProperty] | |||
if (this.resultsProperty) { |
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.
if there are only two conditions, it's better to use if else, easier to read
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.
I think this would be useful functionality, but I'd rather not add another dependency in the form of lodash/get.
On another note the documentation should be updated with examples and a test case added for new functionality.
f67e4e5
to
17254b4
Compare
Added support to access nested data property in response.