Skip to content

Commit

Permalink
use default protocol in defaultProps
Browse files Browse the repository at this point in the history
  • Loading branch information
leizhe authored and leizhe committed Feb 18, 2022
1 parent dc51d0f commit 7efe475
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/tweet-embed.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,6 @@ class TweetEmbed extends React.Component<ITweetEmbedProps> {

const twttr = window['twttr']
if (!(twttr && twttr.ready)) {
const isLocal = window.location.protocol.indexOf('file') >= 0
const protocol = isLocal ? this.props.protocol : ''

addScript(`${protocol}//platform.twitter.com/widgets.js`, renderTweet)
} else {
renderTweet()
Expand Down

0 comments on commit 7efe475

Please sign in to comment.