Skip to content
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

Export objects in fields when exporting csv #5

Merged
merged 2 commits into from
Apr 27, 2018

Conversation

juanborre
Copy link
Contributor

No description provided.

@juanborre juanborre requested review from gcamp and lvancraen April 27, 2018 13:47
helpers/csv.js Outdated
@@ -11,7 +11,10 @@ function formatRegularValue(value) {
return '';
}

value = (typeof value === 'string') ? value : String(value);
const type = typeof value;
value = (type === 'object') ? JSON.stringify(value) : (
Copy link
Member

Choose a reason for hiding this comment

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

Fix works but formatting is not ideal, would do two ifs in this case

@juanborre juanborre merged commit 060c4ed into master Apr 27, 2018
@juanborre juanborre deleted the fix/exportObjectsInFields branch April 27, 2018 14:00
Copy link
Contributor

@lvancraen lvancraen left a comment

Choose a reason for hiding this comment

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

Did you make sure to check we don't already JSON.stringify(value) elsewhere in the code, for instance in an extension? This will most likely cause an issue when trying to retrieve the values if they've already been stringified

@juanborre
Copy link
Contributor Author

Yeah, we do that for ACTIONAU Canberra for example. I will remove the JSON.stringify in USD 👍

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.

3 participants