@samitouri / QOS-React-2 / commits / 1825f30353

Always call callback in component context

This brings these other call sites in line with line 67 of ReactUpdates.js: callbacks[j].call(component);

Ben Alpert committed Jan 13, 2014 at 08:58 UTC 1825f30353e3ebce22d0ded72ed4d4abf3e4d53c
2 files changed +2 -2
src/core/ReactMount.js
+1 -1
@@ -318,7 +318,7 @@ var ReactMount = {
318 container,
319 shouldReuseMarkup
320 );
321 - callback && callback();
321 + callback && callback.call(component);
322 return component;
323 },
324
src/core/ReactUpdates.js
+1 -1
@@ -102,7 +102,7 @@ function enqueueUpdate(component, callback) {
102
103 if (!batchingStrategy.isBatchingUpdates) {
104 component.performUpdateIfNecessary();
105 - callback && callback();
105 + callback && callback.call(component);
106 return;
107 }
108