Closed Bug 1910069 Opened 1 year ago Closed 1 year ago

Menu does not open on click, console displays: Uncaught TypeError: can't access property "enabled", Settings.expansions is undefined

Categories

(Webtools :: Searchfox, defect)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: robwu, Assigned: robwu)

Details

Attachments

(1 file)

Regression caused by https://github.com/mozsearch/mozsearch/commit/67335ce18ff6a7e34e9203973a4009cf1e40ba25

It introduced a new setting without bumping SETTINGS_VERSION. Consequently, when I use Searchfox that already had some settings stored, it won't reach the settings upgrade logic and Settings.expansions is not set to its default value, and the following error is thrown when I click anywhere:

Uncaught TypeError: can't access property "enabled", Settings.expansions is undefined

Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED

I don't know how much time it takes to deploy, but as a work-around you can force the settings migration by opening the Browser's developer tools, running the following code snippet and then reloading the page:

localStorage.setItem(
  "settings",
  JSON.stringify(
    Object.assign(
      JSON.parse(localStorage.getItem("settings")),
      { version: SETTINGS_VERSION - 1 }
    )
  )
);

Thank you!
I've updated the server, so reloading the page should work (unless there's some cache issue)

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: