소스 검색

Prevent tweet expansion from firing more than once

Akinori MUSHA 7 년 전
부모
커밋
e99b82b1eb
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      app/assets/javascripts/tweets.js.coffee

+ 1 - 0
app/assets/javascripts/tweets.js.coffee

@@ -1,6 +1,7 @@
 $ ->
   $('.tweet-body').each ->
     $(this).click ->
+      $(this).off('click')
       twttr.widgets.createTweet(
         this.dataset.tweetId
         this