All pastes #478277 Raw Edit

Anonymous

public text v1 · immutable
·published 2007-05-09 02:14 UTC
rendered paste body
Index: MochiKit/Signal.js
===================================================================
--- MochiKit/Signal.js  (revision 1286)
+++ MochiKit/Signal.js  (working copy)
@@ -541,7 +541,12 @@
         var self = MochiKit.Signal;
         var E = self.Event;
         if (!isDOM) {
-            return MochiKit.Base.bind(func, obj);
+            /* We don't want to re-bind already bound methods */
+            if (typeof(func.im_self) == 'undefined') {
+                return MochiKit.Base.bind(func, obj);
+            } else {
+                return func;
+            }
         }
         obj = obj || src;
         if (typeof(func) == "string") {