Skip to content

Commit a98ff35

Browse files
committed
Move the array creation to the right place
1 parent 17d5df7 commit a98ff35

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

graphql/enterprise/index.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,9 +171,10 @@ <h3>Create a <a href="https://help.github.com/articles/creating-a-personal-acces
171171
function graphQLFetcher(graphQLParams) {
172172
// Determine the API URL for this GitHub Enterprise server
173173

174+
const hostnames = location.hostname.split('.')
175+
174176
if (hostnames[0] === "pages") {
175-
// subdomain isolation enabled
176-
const hostnames = location.hostname.split('.')
177+
// subdomain isolation enabled, so remove the first part of the URL
177178
hostnames.shift()
178179
const apiHost = location.protocol + '//' + hostnames.join('.')
179180
} else {

0 commit comments

Comments
 (0)