-
Notifications
You must be signed in to change notification settings - Fork 736
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Don't open and focus on new tab when sharing playground #893
Comments
@HuVik is this an intentional change? |
i can look into fixes later in my free time |
outside of this change fixing the issue for shared playgrounds without injected headers, it seems like this logic itself is broken -447,7 +447,7 @@ const reducer = handleActions(
// it makes sure, that there definitely is a tab open with the correct header
INJECT_HEADERS: (state, { payload: { headers, endpoint } }) => {
// if there are no headers to inject, there's nothing to do
- if (!headers || headers === '') {
+ if (!headers || headers === '' || Object.keys(headers).length === 0) {
return state
}
const headersString = |
zhammer
added a commit
to zhammer/graphql-playground
that referenced
this issue
Dec 18, 2018
An empty headers dict currently is not treated as having 'no headers to inject' Discussed in: graphql#893
This was referenced Dec 18, 2018
huv1k
pushed a commit
that referenced
this issue
Jan 14, 2019
* Update headers are empty check on INJECT_HEADERS An empty headers dict currently is not treated as having 'no headers to inject' Discussed in: #893 * Accidentally changed line
cgxxv
pushed a commit
to cgxxv/graphql-playground
that referenced
this issue
Mar 25, 2022
* Update headers are empty check on INJECT_HEADERS An empty headers dict currently is not treated as having 'no headers to inject' Discussed in: graphql#893 * Accidentally changed line
filippbudko
added a commit
to filippbudko/graphql-playground
that referenced
this issue
Jan 16, 2023
* Update headers are empty check on INJECT_HEADERS An empty headers dict currently is not treated as having 'no headers to inject' Discussed in: graphql/graphql-playground#893 * Accidentally changed line
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This issue pertains to the following package(s):
What OS and OS version are you experiencing the issue(s) on?
Chrome v 70
What version of graphql-playground(-electron/-middleware) are you experiencing the issue(s) on?
https://www.graphqlbin.com/v2/
What is the expected behavior?
Don't open and focus on "New Tab" when sharing playground.
What is the actual behavior?
"New Tab" is opened and focused.
What steps may we take to reproduce the behavior?
Please provide a gif or image of the issue for a quicker response/fix.
Example here: https://graphqlbin.com/v2/yo8yfN
The text was updated successfully, but these errors were encountered: