snake_case

This commit is contained in:
Rich Harris
2018-09-07 19:45:40 -04:00
committed by GitHub
parent e377515867
commit 0a7be736c0

View File

@@ -525,11 +525,11 @@ function get_page_handler(
}
// users can set a CSP nonce using res.locals.nonce
const nonceAttr = (res.locals && res.locals.nonce) ? ` nonce="${res.locals.nonce}"` : '';
const nonce_attr = (res.locals && res.locals.nonce) ? ` nonce="${res.locals.nonce}"` : '';
const body = template()
.replace('%sapper.base%', () => `<base href="${req.baseUrl}/">`)
.replace('%sapper.scripts%', () => `<script${nonceAttr}>${script}</script>`)
.replace('%sapper.scripts%', () => `<script${nonce_attr}>${script}</script>`)
.replace('%sapper.html%', () => html)
.replace('%sapper.head%', () => `<noscript id='sapper-head-start'></noscript>${head}<noscript id='sapper-head-end'></noscript>`)
.replace('%sapper.styles%', () => styles);