Passed
Push — master ( 6e6c55...72b2aa )
by Christian
11:52 queued 10s
created

sw-cms/elements/product-name/config/index.js (1 issue)

Labels
Severity
1
const { Component, Utils } = Shopware;
0 ignored issues
show
The variable Shopware seems to be never declared. If this is a global, consider adding a /** global: Shopware */ comment.

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.

Loading history...
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