Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Undefined variable item in web/app.html #12762

Closed
3 tasks
jsjolen opened this issue Sep 17, 2024 · 0 comments · Fixed by #12775
Closed
3 tasks

Undefined variable item in web/app.html #12762

jsjolen opened this issue Sep 17, 2024 · 0 comments · Fixed by #12775

Comments

@jsjolen
Copy link

jsjolen commented Sep 17, 2024

The bug

A refactoring 3 weeks ago breaks Immich for browsers who have the local storage thingie . The variable was renamed from item to theme but item was still used in a branch. Just change the variable name in the else-if branch

      const colorThemeKeyName = 'color-theme';

      let theme = localStorage.getItem(colorThemeKeyName);
      if (!theme) {
        theme = { value: 'light', system: true };
      } else if (theme === 'dark' || theme === 'light') {
        theme = { value: item, system: false }; // <- CHANGE TO theme  INSTEAD OF item
        localStorage.setItem(colorThemeKeyName, JSON.stringify(theme));
      } else {
        theme = JSON.parse(theme);
      }

Work around: Remove the local storage thingie via dev tools.

Thx

The OS that Immich Server is running on

Version of Immich Server

master

Version of Immich Mobile App

Platform with the issue

  • Server
  • Web
  • Mobile

Your docker-compose.yml content

not needed

Your .env content

not needed

Reproduction steps

Trivial bug

Relevant log output

No response

Additional information

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant