Skip to content

Commit

Permalink
Fixes a bug where getRoot called after close leads to an infinitely s…
Browse files Browse the repository at this point in the history
…uspending promise.
  • Loading branch information
ztanner authored and gnoff committed Nov 1, 2023
1 parent ca16c26 commit 6147ad9
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,9 @@ function decodeReply<T>(
body = form;
}
const response = createResponse(moduleBasePath, '', body);
const root = getRoot<T>(response);
close(response);
return getRoot(response);
return root;
}

export {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,9 @@ function decodeReply<T>(
body = form;
}
const response = createResponse(turbopackMap, '', body);
const root = getRoot<T>(response);
close(response);
return getRoot(response);
return root;
}

export {renderToReadableStream, decodeReply, decodeAction};
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,9 @@ function decodeReply<T>(
body = form;
}
const response = createResponse(turbopackMap, '', body);
const root = getRoot<T>(response);
close(response);
return getRoot(response);
return root;
}

export {renderToReadableStream, decodeReply, decodeAction};
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,9 @@ function decodeReply<T>(
body = form;
}
const response = createResponse(turbopackMap, '', body);
const root = getRoot<T>(response);
close(response);
return getRoot(response);
return root;
}

export {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,9 @@ function decodeReply<T>(
body = form;
}
const response = createResponse(webpackMap, '', body);
const root = getRoot<T>(response);
close(response);
return getRoot(response);
return root;
}

export {renderToReadableStream, decodeReply, decodeAction, decodeFormState};
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,9 @@ function decodeReply<T>(
body = form;
}
const response = createResponse(webpackMap, '', body);
const root = getRoot<T>(response);
close(response);
return getRoot(response);
return root;
}

export {renderToReadableStream, decodeReply, decodeAction, decodeFormState};
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,9 @@ function decodeReply<T>(
body = form;
}
const response = createResponse(webpackMap, '', body);
const root = getRoot<T>(response);
close(response);
return getRoot(response);
return root;
}

export {
Expand Down

0 comments on commit 6147ad9

Please sign in to comment.