Skip to content

Commit 1b44407

Browse files
committed
fix endpoint injection
1 parent 2d961f3 commit 1b44407

File tree

1 file changed

+1
-1
lines changed
  • packages/graphql-playground-react/src/state/sessions

1 file changed

+1
-1
lines changed

packages/graphql-playground-react/src/state/sessions/reducers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ const reducer = handleActions(
367367
.set('sessionCount', newState.sessions.size)
368368
},
369369
NEW_SESSION: (state, { payload: { reuseHeaders, endpoint } }) => {
370-
let session = makeSession(endpoint)
370+
let session = makeSession(endpoint || state.sessions.first().endpoint)
371371
if (reuseHeaders) {
372372
const selectedSessionId = getSelectedSessionId(state)
373373
const currentSession = state.sessions.get(selectedSessionId)

0 commit comments

Comments
 (0)