Unverified Commit 848af2dc authored by yann300's avatar yann300 Committed by GitHub

fix matomo - switchTo

parent bac95417
......@@ -78,8 +78,8 @@ export class ThemeModule extends Plugin {
if (themeName && !Object.keys(this.themes).includes(themeName)) {
throw new Error(`Theme ${themeName} doesn't exist`)
}
_paq.push(['trackEvent', 'themeModule', 'switchTo', themeName])
const next = themeName || this.active // Name
_paq.push(['trackEvent', 'themeModule', 'switchTo', next])
const nextTheme = this.themes[next] // Theme
if (!this.forced) this._deps.config.set('settings/theme', next)
document.getElementById('theme-link').setAttribute('href', nextTheme.url)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment