diff --git a/packages/@vuepress/theme-vue/components/CarbonAds.vue b/packages/@vuepress/theme-vue/components/CarbonAds.vue index 2e109dc654..d6fa6064e9 100644 --- a/packages/@vuepress/theme-vue/components/CarbonAds.vue +++ b/packages/@vuepress/theme-vue/components/CarbonAds.vue @@ -9,7 +9,7 @@ export default { // Only reload if the ad has been loaded // otherwise it's possible that the script is appended but // the ads are not loaded yet. This would result in duplicated ads. - && this.$el.querySelector('#carbonads') + && this.$el.querySelector('#carbon-ads') ) { this.$el.innerHTML = '' this.load() @@ -31,7 +31,10 @@ export default { }, render (h) { - return h('div', { class: 'carbon-ads' }) + return h('div', { + id: 'carbon-ads', + class: 'carbon-ads' + }) } }