Always call callback in component context

This brings these other call sites in line with line 67 of ReactUpdates.js:

callbacks[j].call(component);
This commit is contained in:
Ben Alpert 2014-01-13 08:58:22 -08:00
parent ad6a982cd0
commit 1825f30353
2 changed files with 2 additions and 2 deletions

View File

@ -318,7 +318,7 @@ var ReactMount = {
container,
shouldReuseMarkup
);
callback && callback();
callback && callback.call(component);
return component;
},

View File

@ -102,7 +102,7 @@ function enqueueUpdate(component, callback) {
if (!batchingStrategy.isBatchingUpdates) {
component.performUpdateIfNecessary();
callback && callback();
callback && callback.call(component);
return;
}