Skip to content

Commit

Permalink
Use suggestion from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
klippx committed Jun 18, 2024
1 parent 4604de9 commit ea1905d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/graphiql-react/src/editor/tabs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,9 @@ export function useSetEditorValues({
}) => {
queryEditor?.setValue(query ?? '');
variableEditor?.setValue(variables ?? '');
headerEditor?.setValue(headers ?? headerEditor?.getValue() ?? '');
if (headerEditor && headers?.length) {
headerEditor.setValue(headers);
}
responseEditor?.setValue(response ?? '');
},
[headerEditor, queryEditor, responseEditor, variableEditor],
Expand Down

0 comments on commit ea1905d

Please sign in to comment.