From 1825f30353e3ebce22d0ded72ed4d4abf3e4d53c Mon Sep 17 00:00:00 2001 From: Ben Alpert Date: Mon, 13 Jan 2014 08:58:22 -0800 Subject: [PATCH] Always call callback in component context This brings these other call sites in line with line 67 of ReactUpdates.js: callbacks[j].call(component); --- src/core/ReactMount.js | 2 +- src/core/ReactUpdates.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/ReactMount.js b/src/core/ReactMount.js index e98e2fbb01..b44fa7bc0f 100644 --- a/src/core/ReactMount.js +++ b/src/core/ReactMount.js @@ -318,7 +318,7 @@ var ReactMount = { container, shouldReuseMarkup ); - callback && callback(); + callback && callback.call(component); return component; }, diff --git a/src/core/ReactUpdates.js b/src/core/ReactUpdates.js index d866eec089..c1d92e1f29 100644 --- a/src/core/ReactUpdates.js +++ b/src/core/ReactUpdates.js @@ -102,7 +102,7 @@ function enqueueUpdate(component, callback) { if (!batchingStrategy.isBatchingUpdates) { component.performUpdateIfNecessary(); - callback && callback(); + callback && callback.call(component); return; }