Skip to content

Commit

Permalink
temporary patch to fix react bug upstreamed in facebook/react#31169
Browse files Browse the repository at this point in the history
  • Loading branch information
gnoff committed Oct 10, 2024
1 parent f93250c commit 5239813
Showing 1 changed file with 12 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -850,16 +850,18 @@ function serializeThenable(request, task, thenable) {
pingTask(request, newTask);
},
function (reason) {
"object" === typeof reason &&
null !== reason &&
reason.$$typeof === REACT_POSTPONE_TYPE
? (logPostpone(request, reason.message, newTask),
emitPostponeChunk(request, newTask.id))
: ((reason = logRecoverableError(request, reason, newTask)),
emitErrorChunk(request, newTask.id, reason));
newTask.status = 4;
request.abortableTasks.delete(newTask);
enqueueFlush(request);
if (newTask.status === 0) {
"object" === typeof reason &&
null !== reason &&
reason.$$typeof === REACT_POSTPONE_TYPE
? (logPostpone(request, reason.message, newTask),
emitPostponeChunk(request, newTask.id))
: ((reason = logRecoverableError(request, reason, newTask)),
emitErrorChunk(request, newTask.id, reason));
newTask.status = 4;
request.abortableTasks.delete(newTask);
enqueueFlush(request);
}
}
);
return newTask.id;
Expand Down

0 comments on commit 5239813

Please sign in to comment.