Skip to content

Commit

Permalink
Merge branch 'ntr/fix-seo-module-js-error' into 'master'
Browse files Browse the repository at this point in the history
NTR - Fix v-for in seo module

See merge request shopware/6/product/platform!333
  • Loading branch information
jleifeld committed Sep 12, 2019
2 parents fb6be5e + a407e7a commit 4b492b1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
Expand Up @@ -281,6 +281,11 @@ Component.register('sw-seo-url-template-card', {
onSalesChannelChanged(salesChannelId) {
this.salesChannelId = salesChannelId;
this.fetchSeoUrlTemplates(salesChannelId);
},
getTemplatesForSalesChannel(salesChannelId) {
return this.seoUrlTemplates.filter((templateEntity) => {
return templateEntity.salesChannelId === salesChannelId;
});
}
}
});
Expand Up @@ -9,8 +9,8 @@
</sw-sales-channel-switch>
</template>
{% block sw_seo_url_template_card_entries %}
<template v-if="seoUrlTemplate.salesChannelId === salesChannelId && !isLoading && !salesChannelIsHeadless">
<div v-for="seoUrlTemplate in seoUrlTemplates"
<template v-if="!isLoading && !salesChannelIsHeadless">
<div v-for="seoUrlTemplate in getTemplatesForSalesChannel(salesChannelId)"
class="sw-seo-url-template-card__seo-url">
<sw-container columns="3fr 1fr" gap="5px" >
{% block sw_seo_url_template_card_entries_input_wrapper %}
Expand Down

0 comments on commit 4b492b1

Please sign in to comment.