From 9dc440ff4100d8ae22145aca739b090a38a00214 Mon Sep 17 00:00:00 2001 From: "Antoine Vandevenne (anv)" Date: Wed, 22 Jun 2022 14:27:12 +0000 Subject: [PATCH] [FIX] odoo_theme: correctly test for fallback URLs when using switchers closes odoo/documentation#2269 X-original-commit: 9e84b6f681ea2cb9ae95748ecf1afaa0ab086ea5 Signed-off-by: Antoine Vandevenne (anv) --- extensions/odoo_theme/static/js/switchers.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/odoo_theme/static/js/switchers.js b/extensions/odoo_theme/static/js/switchers.js index 8cbb82646..e9692875a 100644 --- a/extensions/odoo_theme/static/js/switchers.js +++ b/extensions/odoo_theme/static/js/switchers.js @@ -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);