Bug report: Unintended infinite reloading occurs when visiting Tesla Japan's web page with English settings

I found a bug on Tesla Japan's website.

Bug report: Unintended infinite reloading occurs when visiting Tesla Japan's web page with English settings

How to reproduce:

  1. Choose the United States English from the language setting menu in https://tesla.com.

choose_english

  1. Visit, for example, https://www.tesla.com/jp/blog/mission-tesla.
    The browser reloads the page infinitely.

tesla-japan-reload

Cause of the issue

When you select your language, ip_lookup_desired_locale cookie gets set to en_us.

locale_developer_tools

When visiting https://www.tesla.com/jp/blog/mission-tesla, the following javascript file is loaded https://www.tesla.com/modules/custom/tesla_mega_menu/dist/1.0.0/header.bundle.js?qvya2d.
Method rerouteToSavedLocale() in the JavaScript file is calling window.location.assign() with exactly the same path as the current page, i.e. //www.tesla.com/jp/blog/mission-tesla, which is causing the infinite reload.

rerouteToSavedLocale

I hope this issue will be resolved soon and everybody can enjoy the contents of Tesla’s website.

Affected Paths

This bug appears in all of the following pages and their descendants (e.g., https://www.tesla.com/jp/blog/mission-tesla).

Reproducible Environments

I believe that this bug happens regardless of users' environment. However, I have tested and confirmed the bug in the following environments:

  • MacBook Pro, macOS 10.15.7, Google Chrome 91.0.4472.114 (Official Build) (x86_64)
  • iPhone 12, iOS 14.6, Safari 14.1.1

Dates Confirmed

  • First confirmed: October 7, 2021 (GMT+9)
  • Last confirmed: 11:55, July 21, 2021 (GMT+9)