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

Remove null in rss feed when no address in meetup #192

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ripoul
Copy link
Contributor

@ripoul ripoul commented Jun 9, 2021

When the covid strike too hard, we have to do our meeting remotely. In this case, in the rss feed, the address is displayed as null null null. https://i.imgur.com/9r9IKIn.png

@netlify
Copy link

netlify bot commented Jun 9, 2021

👷 Deploy request for kind-hoover-e61df1 pending review.
Visit the deploys page to approve it

🔨 Explore the source changes: 319f072

@@ -22,7 +22,7 @@ const formatContent = ({
<p>${t.description}</p>
<p>Par:</p>
<ul>
${t.speakers.reduce((b, s) => isUrl(s.link) ? (`${b}<li><a href="${s.link}">${s.name}</a></li>`) :
${t.speakers.reduce((b, s) => isUrl(s.link) ? (`${b}<li><a href="${s.link}">${s.name}</a></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 can't see any difference?

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 space at the end. It's my linter who did it. I can re-add it.

rss.js Outdated
@@ -37,7 +37,7 @@ const formatContent = ({
} = venue;
const location = `
${link ? `<a href="${link}">${name}</a>`: name}<br/>
${address} ${postal_code} ${city}
${address ? `${address}` : ""} ${postal_code ? `${postal_code}` : ""} ${city ? `${city}` : ""}
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
${address ? `${address}` : ""} ${postal_code ? `${postal_code}` : ""} ${city ? `${city}` : ""}
${address ?? ""} ${postal_code ?? ""} ${city ?? ""}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thx didn't know the ?? in js

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@charlyx It is compatible only with node 14. doc. I can use variable to make something cleaner than my old proposition ?

Co-authored-by: Charles-Henri GUERIN <charleshenri.guerin@me.com>
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