Passed
Push — master ( 366f40...c67819 )
by Christian
13:04 queued 10s
created

src/app/component/media/sw-media-replace/index.js (1 issue)

1
/**
2
 * @public
3
 * @status ready
4
 * @description The <u>sw-media-replace</u> component extends the <u>sw-media-upload</u> component. It is
5
 * used in cases of replacing items rather than uploading them.
6
 * @example-type code-only
7
 * @component-example
8
 * <sw-media-replace itemToReplace="mediaItem" variant="regular">
9
 * </sw-media-replace>
10
 */
11
Shopware.Component.extend('sw-media-replace', 'sw-media-upload-v2', {
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...
12
    props: {
13
        itemToReplace: {
14
            type: Object,
15
            required: true
16
        }
17
    },
18
19
    data() {
20
        return {
21
            multiSelect: false
22
        };
23
    },
24
25
    methods: {
26
        getMediaEntityForUpload() {
27
            return this.itemToReplace;
28
        },
29
30
        cleanUpFailure(mediaEntity, message) {
31
            this.createNotificationError({ message });
32
        }
33
    }
34
});
35