Check for truthiness of alternate
This is unfortunate since we agreed on using the `null | Fiber` convention instead of `?Fiber` but haven't upgraded yet and this is the pattern I've been using everywhere else so far.
Sebastian Markbage committed
Sep 2, 2016 at 17:23 UTC
f3a2dc252edadd360b28b653cde082e066e478be
1 file changed
+2
-2
src/renderers/shared/fiber/ReactFiberBeginWork.js
+2
-2
@@ -121,7 +121,7 @@ module.exports = function<T, P, I, C>(config : HostConfig<T, P, I, C>, getSchedu
121
fiber.updateQueue = updateQueue;
122
// Schedule update on the alternate as well, since we don't know which tree
123
// is current.
124
- if (fiber.alternate !== null) {
124
+ if (fiber.alternate) {
125
fiber.alternate.updateQueue = updateQueue;
126
}
127
while (true) {
@@ -129,7 +129,7 @@ module.exports = function<T, P, I, C>(config : HostConfig<T, P, I, C>, getSchedu
129
fiber.pendingWorkPriority >= priorityLevel) {
130
fiber.pendingWorkPriority = priorityLevel;
131
}
132
- if (fiber.alternate !== null) {
132
+ if (fiber.alternate) {
133
if (fiber.alternate.pendingWorkPriority === NoWork ||
134
fiber.alternate.pendingWorkPriority >= priorityLevel) {
135
fiber.alternate.pendingWorkPriority = priorityLevel;