Skip to content

Conversation

@piscis
Copy link
Contributor

@piscis piscis commented Sep 14, 2025

Description

This test if the preferenceStore variable is initialized. For anonymous users visiting a share link URL this is not the case and that leads to a javascript error described in #21957

By checking if the preferencesStore is defined anonymous users should not get the javascript error and chrome cast initialisation will be disabled.

Fixes #21957

How Has This Been Tested?

no tests

API Changes

none

Checklist:

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation if applicable
  • I have no unrelated changes in the PR.
  • I have confirmed that any new dependencies are strictly necessary.
  • I have written tests for new code (if applicable)
  • I have followed naming conventions/patterns in the surrounding code
  • All code in src/services/ uses repositories implementations for database calls, filesystem operations, etc.
  • All code in src/repositories/ is pretty basic/simple and does not have any immich specific logic (that belongs in src/services/)

Please describe to which degree, if any, an LLM was used in creating this pull request.

none

@alextran1502 alextran1502 changed the title Check if preferencesStore is defined fix : check if preferencesStore is defined Sep 14, 2025
Copy link
Member

@danieldietzler danieldietzler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@danieldietzler danieldietzler changed the title fix : check if preferencesStore is defined fix: check if preferencesStore is defined Sep 14, 2025
@danieldietzler danieldietzler enabled auto-merge (squash) September 14, 2025 20:29
@danieldietzler danieldietzler merged commit 15f1829 into immich-app:main Sep 14, 2025
54 of 57 checks passed
jochbru pushed a commit to pixelunioneu/immich that referenced this pull request Sep 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Javascript error potentially crashing shared link page on slow connections for anonymous user

3 participants