Merge pull request #876 from spicyj/cb-ctx

Always call callback in component context
This commit is contained in:
Christoph Pojer
2014-01-13 09:04:33 -08:00
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -318,7 +318,7 @@ var ReactMount = {
container,
shouldReuseMarkup
);
callback && callback();
callback && callback.call(component);
return component;
},
+1 -1
View File
@@ -102,7 +102,7 @@ function enqueueUpdate(component, callback) {
if (!batchingStrategy.isBatchingUpdates) {
component.performUpdateIfNecessary();
callback && callback();
callback && callback.call(component);
return;
}