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

fix(web): loading leaflet in production builds #2526

Merged
merged 1 commit into from May 23, 2023

Conversation

michelheusschen
Copy link
Contributor

Fixes SSR of the map view in production builds. Leaflet accesses window and can't be imported directly. We were using the #await syntax, but that also runs on the server causing it to crash. Using the sidebar navigation to visit the map still works, the issue only arises when visiting /map directly. Also changes the way asset markers are added and removed from the map, which should improve (re)loading performance a bit.

Fixes #2525

@vercel
Copy link

vercel bot commented May 23, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Updated (UTC)
immich ⬜️ Ignored (Inspect) May 23, 2023 8:05am

@alextran1502 alextran1502 merged commit 99b018c into main May 23, 2023
18 checks passed
@alextran1502 alextran1502 deleted the fix/web-map-loading branch May 23, 2023 09:14
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 this pull request may close these issues.

[BUG] Map View crashes immich-web
2 participants