Skip to content

Commit

Permalink
chore: correct typo yandexMetika -> yandexMetrika
Browse files Browse the repository at this point in the history
  • Loading branch information
yarastqt committed Nov 28, 2020
1 parent d090689 commit 7dc7588
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion website/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ module.exports = {
],
copyright: `Copyright © ${new Date().getFullYear()} themekit.`,
},
yandexMetika: {
yandexMetrika: {
counterId: 69813862,
},
},
Expand Down
10 changes: 5 additions & 5 deletions website/plugins/yandex-metrika.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@ module.exports = function(context) {

const { siteConfig } = context
const { themeConfig } = siteConfig
const { yandexMetika } = themeConfig || {}
const { yandexMetrika } = themeConfig || {}

if (!yandexMetika) {
if (!yandexMetrika) {
throw new Error(
`You need to specify 'yandexMetika' object in 'themeConfig' with 'counterId' field in it to use docusaurus-plugin-yandex-metrika`,
`You need to specify 'yandexMetrika' object in 'themeConfig' with 'counterId' field in it to use docusaurus-plugin-yandex-metrika`,
)
}

const { counterId, debug = false } = yandexMetika
const { counterId, debug = false } = yandexMetrika

if (!counterId) {
throw new Error(
"You specified the 'yandexMetika' object in 'themeConfig' but the 'counterId' field was missing. " +
"You specified the 'yandexMetrika' object in 'themeConfig' but the 'counterId' field was missing. " +
'Please ensure this is not a mistake.',
)
}
Expand Down

0 comments on commit 7dc7588

Please sign in to comment.