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

Fix a couple bugs with organizer view #13979

Merged
merged 1 commit into from Mar 24, 2017
Merged

Conversation

mehalshah
Copy link
Contributor

  • blank comments should not get bullets
  • should not include enrollments for pending classes for workshop aggregations

- blank comments should not get bullets
- should not include enrollments for pending classes for workshop aggregations
@mehalshah mehalshah requested a review from Hamms March 24, 2017 00:05
@@ -307,7 +307,7 @@ const SurveyResultsHeader = React.createClass({
<b>{question['text']}</b>
{
thisWorkshop[question['key']].map((answer, j) => {
return (
return !!(_.trim(answer)) && (
Copy link
Contributor

Choose a reason for hiding this comment

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

why not just filter before maping?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The syntax got really compressed.

_.filter(thisWorkshop[question['key']], (answer) => {return !!_.trim(answer)}).map((answer, j) => {
                return (
                  <li key={j}>
                    {answer}
                  </li>
                );
              })

Copy link
Contributor

Choose a reason for hiding this comment

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

I was thinking more

thisWorkshop[question['key']].filter((answer) => {
  return !!_.trim(answer);
}).map((answer, j)) => {
  return (
    <li key={j}>
      {answer}
    </li>
  );
});

@mehalshah mehalshah merged commit a9fa85d into staging Mar 24, 2017
@davidsbailey davidsbailey deleted the fix_organizer_view_bugs branch August 8, 2017 17:25
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.

None yet

2 participants