NUKnightLab / NUKnightLab/TimelineJS3
twitterembed sometimes has undefined `this`
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 3.2k
- Forks
- 645
- PR merge metrics
- No merged PRs in 30d
Description
A Zendesk report shared a configuration that uses Twitter embed codes instead of URLs. These tweets appear in the timeline inconsistently. Some of them throw a console log about an undefined this here: https://github.com/NUKnightLab/TimelineJS3/blob/e6c81d21db04589a01bbac1c05d6fd3efa461c30/src/js/media/types/TwitterEmbed.js#L88
The workaround seems to be using direct tweet URLs and letting Timeline handle everything, but we should see if we can correct this issue. Here's a link to a copy of the problem timeline config, which admittedly only I can read, because we didn't get permission to share the content more widely. If anyone can come up with a public replication case before we get around to fixing this, it might be nice to add here.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in src/js/media/types/TwitterEmbed.js at line 88 and inspect how Twitter embed codes are processed. Use the linked report or configuration details to find a reproducible case, then verify that embedded tweets render consistently without the undefined this console error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100