Skip to content

Commit b3bead8

Browse files
committed
Prettier
1 parent 6432128 commit b3bead8

File tree

1 file changed

+9
-6
lines changed
  • src/Elastic.Documentation.Site/Assets

1 file changed

+9
-6
lines changed

src/Elastic.Documentation.Site/Assets/main.ts

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -94,21 +94,24 @@ document.body.addEventListener('htmx:responseError', function (event) {
9494

9595
// We add a query string to the get request to make sure the requested page is up to date
9696
const docsBuilderVersion = $('body').dataset.docsBuilderVersion
97-
document.body.addEventListener('htmx:configRequest', function(event) {
97+
document.body.addEventListener('htmx:configRequest', function (event) {
9898
if (event.detail.verb === 'get') {
99-
event.detail.parameters['v'] = docsBuilderVersion;
99+
event.detail.parameters['v'] = docsBuilderVersion
100100
}
101-
});
101+
})
102102

103103
// Here we need to strip the v parameter from the URL so
104104
// that the browser doesn't show the v parameter in the address bar
105105
document.body.addEventListener('htmx:beforeHistoryUpdate', function (event) {
106-
const params = new URLSearchParams(event.detail.history.path.split('?')[1] ?? '')
106+
const params = new URLSearchParams(
107+
event.detail.history.path.split('?')[1] ?? ''
108+
)
107109
params.delete('v')
108110
const pathWithoutQueryString = event.detail.history.path.split('?')[0]
109111
if (params.size === 0) {
110112
event.detail.history.path = pathWithoutQueryString
111113
} else {
112-
event.detail.history.path = pathWithoutQueryString + '?' + params.toString()
114+
event.detail.history.path =
115+
pathWithoutQueryString + '?' + params.toString()
113116
}
114-
});
117+
})

0 commit comments

Comments
 (0)