mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
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.
This commit is contained in:
@@ -121,7 +121,7 @@ module.exports = function<T, P, I, C>(config : HostConfig<T, P, I, C>, getSchedu
|
||||
fiber.updateQueue = updateQueue;
|
||||
// Schedule update on the alternate as well, since we don't know which tree
|
||||
// is current.
|
||||
if (fiber.alternate !== null) {
|
||||
if (fiber.alternate) {
|
||||
fiber.alternate.updateQueue = updateQueue;
|
||||
}
|
||||
while (true) {
|
||||
@@ -129,7 +129,7 @@ module.exports = function<T, P, I, C>(config : HostConfig<T, P, I, C>, getSchedu
|
||||
fiber.pendingWorkPriority >= priorityLevel) {
|
||||
fiber.pendingWorkPriority = priorityLevel;
|
||||
}
|
||||
if (fiber.alternate !== null) {
|
||||
if (fiber.alternate) {
|
||||
if (fiber.alternate.pendingWorkPriority === NoWork ||
|
||||
fiber.alternate.pendingWorkPriority >= priorityLevel) {
|
||||
fiber.alternate.pendingWorkPriority = priorityLevel;
|
||||
|
||||
Reference in New Issue
Block a user