[PR #2440] [MERGED] fix(frontend): origUrlToCheck references the same object as urlToCheck #9985

Closed
opened 2026-04-23 09:19:38 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/go-vikunja/vikunja/pull/2440
Author: @mdrkrg
Created: 3/23/2026
Status: Merged
Merged: 3/23/2026
Merged by: @kolaente

Base: mainHead: fix/helper-url-reference


📝 Commits (1)

  • 9dbb0b5 fix(frontend): origUrlToCheck references the same object as urlToCheck

📊 Changes

1 file changed (+3 additions, -3 deletions)

View changed files

📝 frontend/src/helpers/checkAndSetApiUrl.ts (+3 -3)

📄 Description

When later urlToCheck is restored in catch blocks, origUrlToCheck will already be mutated.

Fixed by storing the original pathname as a string copy instead of keeping a reference to the same URL object.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/go-vikunja/vikunja/pull/2440 **Author:** [@mdrkrg](https://github.com/mdrkrg) **Created:** 3/23/2026 **Status:** ✅ Merged **Merged:** 3/23/2026 **Merged by:** [@kolaente](https://github.com/kolaente) **Base:** `main` ← **Head:** `fix/helper-url-reference` --- ### 📝 Commits (1) - [`9dbb0b5`](https://github.com/go-vikunja/vikunja/commit/9dbb0b5a5c88af98f0b82098dc37a4fe309838ef) fix(frontend): origUrlToCheck references the same object as urlToCheck ### 📊 Changes **1 file changed** (+3 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `frontend/src/helpers/checkAndSetApiUrl.ts` (+3 -3) </details> ### 📄 Description When later `urlToCheck` is restored in catch blocks, `origUrlToCheck` will already be mutated. Fixed by storing the original pathname as a string copy instead of keeping a reference to the same URL object. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-23 09:19:38 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/vikunja#9985