Skip to content

Commit

Permalink
fix: switch accept order to restore shallow form updates
Browse files Browse the repository at this point in the history
  • Loading branch information
smeijer committed Sep 13, 2021
1 parent 8119677 commit 6a86f94
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/handle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ export function handle<

const result = await handlers[method](context);

switch (accept.type(['json', 'html'])) {
// Note, we can't make this api first. That will break shallow rerender
switch (accept.type(['html', 'json'])) {
case 'html': {
res.setHeader('content-type', 'text/html');
return result;
Expand Down

0 comments on commit 6a86f94

Please sign in to comment.