Skip to content

fix(exportXXX): bind the methods #663

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

Merged
merged 5 commits into from
Feb 7, 2018
Merged

fix(exportXXX): bind the methods #663

merged 5 commits into from
Feb 7, 2018

Conversation

Haroenv
Copy link
Contributor

@Haroenv Haroenv commented Feb 7, 2018

Summary

These two errors were unnoticed, because the integration tests apparently bind everything.

Result

fixes #660

No more error about this.as._jsonRequest being undefined

These two errors were unnoticed, because the integration tests apparently bind everything.

fixes #660
@Haroenv Haroenv requested review from vvo and adrienjoly February 7, 2018 10:18
@@ -0,0 +1,166 @@
'use strict';
Copy link

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Because it's not a single API call, it's more like browseAll

Copy link

Choose a reason for hiding this comment

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

got it

@vvo
Copy link

vvo commented Feb 7, 2018

Can you also add a return here:

return search().then(function(data) {
if (typeof callback === 'function') {
callback(data);
}

This should be callback(); return;

so that you do not return the promise too (nothing major but still)

@vvo vvo merged commit f23098a into develop Feb 7, 2018
@Haroenv Haroenv deleted the fix/bind-exports branch February 7, 2018 12:29
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.

exportRules() throws ⚡️ Cannot read property '_jsonRequest' of undefined
2 participants