From 192727e152be303cf3102ce89c6559981c9194fc Mon Sep 17 00:00:00 2001 From: Ben Alpert Date: Thu, 15 Aug 2013 01:24:01 -0700 Subject: [PATCH] Make .bind(null, ...) work on autobound methods Fixes #266. --- src/core/ReactCompositeComponent.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/ReactCompositeComponent.js b/src/core/ReactCompositeComponent.js index 3fc8a5e67d60..8a4846db58f2 100644 --- a/src/core/ReactCompositeComponent.js +++ b/src/core/ReactCompositeComponent.js @@ -819,7 +819,7 @@ var ReactCompositeComponentMixin = { // User is trying to bind() an autobound method; we effectively will // ignore the value of "this" that the user is trying to use, so // let's warn. - if (newThis !== component) { + if (newThis !== component && newThis !== null) { console.warn( 'bind(): React component methods may only be bound to the ' + 'component instance. See ' + componentName