浏览代码

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