[FIX] odoo_theme: correctly test for fallback URLs when using switchers
closes odoo/documentation#2275
X-original-commit: 9e84b6f681
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
This commit is contained in:
parent
06d259b93d
commit
b3f26c2914
@ -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