[FIX] odoo_theme: correctly test for fallback URLs when using switchers
closes odoo/documentation#2266 Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
This commit is contained in:
parent
80c7b27827
commit
9e84b6f681
@ -16,7 +16,7 @@
|
||||
element.addEventListener('click', async event => {
|
||||
if (element.hasAttribute('href')) {
|
||||
const targetUrl = element.getAttribute('href');
|
||||
if (!targetUrl.startWith('/')) { // Don't test for valid URLs if in localhost.
|
||||
if (!targetUrl.startsWith('/')) { // Don't test for valid URLs if in localhost.
|
||||
event.preventDefault();
|
||||
const fallbackUrls = await _generateFallbackUrls(targetUrl);
|
||||
const fallbackUrl = await _getFirstValidUrl(fallbackUrls);
|
||||
|
Loading…
Reference in New Issue
Block a user