@samitouri / QOS-React-2 / commits / 061c6fc13c

Avoid passing `this` of a static object

Refactoring artifact.

Sebastian Markbage committed Feb 25, 2015 at 18:37 UTC 061c6fc13cd884df942cda1bdf01d947211981e8
2 files changed +1 -2
src/core/ReactReconciler.js
-1
@@ -86,7 +86,6 @@ var ReactReconciler = {
86 }
87
88 var refsChanged = ReactRef.shouldUpdateRefs(
89 - this,
89 prevElement,
90 nextElement
91 );
src/core/ReactRef.js
+1 -1
@@ -40,7 +40,7 @@ ReactRef.attachRefs = function(instance, element) {
40 }
41 };
42
43 -ReactRef.shouldUpdateRefs = function(instance, prevElement, nextElement) {
43 +ReactRef.shouldUpdateRefs = function(prevElement, nextElement) {
44 // If either the owner or a `ref` has changed, make sure the newest owner
45 // has stored a reference to `this`, and the previous owner (if different)
46 // has forgotten the reference to `this`. We use the element instead