[FIX] website: prevent crash with no_icon_color social links

Prior to this commit, when you removed a social link in the header,
there was an error.
This is because `website.header_social_links_no_color` targets selectors
that do not exist in this situation.

task-3572219

closes odoo/odoo#139883

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
This commit is contained in:
Brieuc-brd
2023-10-31 00:01:42 +00:00
committed by qsm-odoo
parent bef68e577a
commit 03b5ba865f
+1 -13
View File
@@ -2856,19 +2856,7 @@ Sitemap: <t t-esc="url_root"/>sitemap.xml
</template>
<template id="website.header_social_links_no_color" inherit_id="website.header_social_links" name="Header Social Links - No Color" primary="True">
<xpath expr="//div[hasclass('s_social_media')]" position="attributes">
<attribute name="class" remove="" add="no_icon_color" separator=" "/>
</xpath>
<xpath expr="//a[hasclass('s_social_media_facebook')]" position="attributes">
<attribute name="class" remove="" add="text-reset" separator=" "/>
</xpath>
<xpath expr="//a[hasclass('s_social_media_twitter')]" position="attributes">
<attribute name="class" remove="" add="text-reset" separator=" "/>
</xpath>
<xpath expr="//a[hasclass('s_social_media_linkedin')]" position="attributes">
<attribute name="class" remove="" add="text-reset" separator=" "/>
</xpath>
<xpath expr="//a[hasclass('s_social_media_instagram')]" position="attributes">
<attribute name="class" remove="" add="text-reset" separator=" "/>
<attribute name="class" remove="" add="no_icon_color text-reset" separator=" "/>
</xpath>
</template>