1 | const { Component, Utils } = Shopware; |
||
0 ignored issues
–
show
|
|||
2 | |||
3 | Component.extend('sw-cms-el-config-product-name', 'sw-cms-el-config-text', { |
||
4 | computed: { |
||
5 | isProductPage() { |
||
6 | return Utils.get(this.cmsPageState, 'currentPage.type', '') === 'product_detail'; |
||
7 | } |
||
8 | }, |
||
9 | |||
10 | methods: { |
||
11 | createdComponent() { |
||
12 | this.initElementConfig('product-name'); |
||
13 | |||
14 | if (this.isProductPage && !Utils.get(this.element, 'translated.config.content')) { |
||
15 | this.element.config.content.source = 'mapped'; |
||
16 | this.element.config.content.value = 'product.name'; |
||
17 | } |
||
18 | } |
||
19 | } |
||
20 | }); |
||
21 |
This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.
To learn more about declaring variables in Javascript, see the MDN.