Explorar o código

Prevent tweet expansion from firing more than once

Akinori MUSHA %!s(int64=7) %!d(string=hai) anos
pai
achega
e99b82b1eb
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  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