diff --git a/globalClientModule.ts b/globalClientModule.ts index 2077af3..1452a09 100644 --- a/globalClientModule.ts +++ b/globalClientModule.ts @@ -1,18 +1,18 @@ -import ExecutionEnvironment from '@docusaurus/ExecutionEnvironment'; -import {ClientModule} from "@docusaurus/types"; +import ExecutionEnvironment from '@docusaurus/ExecutionEnvironment' +import {ClientModule} from '@docusaurus/types' const module: ClientModule = { - onRouteDidUpdate({location, previousLocation}) { - if (ExecutionEnvironment.canUseDOM) { - if (location.pathname != previousLocation?.pathname) { - _paq.push(['setCustomUrl', location.pathname]) - _paq.push(['setDocumentTitle', document.title]) - _paq.push(['trackPageView']) - console.log(`path = ${location.pathname}`) - console.log(`title = ${document.title}`) - } - } + onRouteDidUpdate({location, previousLocation}) { + if (ExecutionEnvironment.canUseDOM) { + if (location.pathname != previousLocation?.pathname) { + _paq.push(['setCustomUrl', location.pathname]) + _paq.push(['setDocumentTitle', document.title]) + _paq.push(['trackPageView']) + console.log(`path = ${location.pathname}`) + console.log(`title = ${document.title}`) + } } + } } export default module