Skip to content

Commit

Permalink
Fixed multiline string variables.
Browse files Browse the repository at this point in the history
Closes #652.
  • Loading branch information
imolorhe committed Mar 16, 2019
1 parent f0a2992 commit 680f1c8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/altair-static/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,17 +51,17 @@ export const renderAltair = ({

altairHtml = altairHtml.replace(/<base.*>/, `<base href="${baseURL}">`);
if (endpointURL) {
renderedOptions += `window.__ALTAIR_ENDPOINT_URL__ = '${endpointURL}';`;
renderedOptions += `window.__ALTAIR_ENDPOINT_URL__ = \`${endpointURL}\`;`;
}
if (subscriptionsEndpoint) {
renderedOptions += `window.__ALTAIR_SUBSCRIPTIONS_ENDPOINT__ = '${subscriptionsEndpoint}';`;
renderedOptions += `window.__ALTAIR_SUBSCRIPTIONS_ENDPOINT__ = \`${subscriptionsEndpoint}\`;`;
}
if (initialQuery) {
renderedOptions += `window.__ALTAIR_INITIAL_QUERY__ = '${initialQuery}';`;
renderedOptions += `window.__ALTAIR_INITIAL_QUERY__ = \`${initialQuery}\`;`;
}

if (initialVariables) {
renderedOptions += `window.__ALTAIR_INITIAL_VARIABLES__ = '${initialVariables}';`;
renderedOptions += `window.__ALTAIR_INITIAL_VARIABLES__ = \`${initialVariables}\`;`;
}

if (initialHeaders) {
Expand Down

0 comments on commit 680f1c8

Please sign in to comment.