Przeglądaj źródła

Prevent tweet expansion from firing more than once

Akinori MUSHA 7 lat temu
rodzic
commit
e99b82b1eb
1 zmienionych plików z 1 dodań i 0 usunięć
  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