When posting to Facebook or Twitter, the voting location name should be populated (and "fucktified").
Actual behavior
Because early vote sites and drop off locations have a separate property for name (e.g. earlyVoteSite[].name vs. earlyVoteSite[].address.locationName), sometimes the name is missed in generating the tweet or post.
This section in src/scripts/components/Actions.js in the function buildTweet() is mainly the culprit for tweets:
if (location.locationName) {
text = encodeURI('I vote at ' + helpers.titlecase(helpers.fucktify(location.locationName)) + ' where the fuck do you vote? Find out at');
} else {
text = 'I found my fucking polling location, where the fuck do you vote? Find out at';
}
And this one, also in src/scripts/components/Actions.js, for posts:
It's a little difficult to reproduce since some early vote sites have address.locationName populated. Attempt to post to either Facebook or Twitter on a site that's lacking it and you'll see the issue.
Expected behavior
When posting to Facebook or Twitter, the voting location name should be populated (and "fucktified").
Actual behavior
Because early vote sites and drop off locations have a separate property for name (e.g. earlyVoteSite[].name vs. earlyVoteSite[].address.locationName), sometimes the name is missed in generating the tweet or post.
This section in
src/scripts/components/Actions.js
in the functionbuildTweet()
is mainly the culprit for tweets:And this one, also in
src/scripts/components/Actions.js
, for posts:Steps to reproduce the behavior
It's a little difficult to reproduce since some early vote sites have
address.locationName
populated. Attempt to post to either Facebook or Twitter on a site that's lacking it and you'll see the issue.