Skip to content

Conversation

yvalentin
Copy link
Contributor

No description provided.

@yvalentin yvalentin requested review from ttdm and Copilot July 30, 2025 14:01
@yvalentin yvalentin self-assigned this Jul 30, 2025
@yvalentin yvalentin linked an issue Jul 30, 2025 that may be closed by this pull request
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR enhances the URL parsing logic in the isLocalLink method by adding fallback handling for environments that may not support the URL.canParse method. The changes improve compatibility and add defensive programming practices.

  • Adds null/undefined check for token.href before processing
  • Extracts URL parsing logic into a separate private method with fallback handling
  • Implements try-catch fallback when URL.canParse is not available

Copy link
Contributor

@ttdm ttdm left a comment

Choose a reason for hiding this comment

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

Je ne pense pas que le check sur l'existence de token.href soit nécessaire mais ça a l'intéret de clarifier le comportement.
Je trouve ça cool.

@yvalentin yvalentin merged commit 09b0ad4 into main Sep 1, 2025
12 checks passed
@yvalentin yvalentin deleted the fix/can-parse branch September 1, 2025 08:55
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.

Sentry - Error : URL.canParse
2 participants