Skip to content

Conversation

@iOvergaard
Copy link
Contributor

@iOvergaard iOvergaard commented Nov 28, 2025

Description

Allows URL objects to be passed to the history navigator.

This is a bug caused by a change in #20928 where navigated URLs now can be entire objects.

How to test

  1. Go to Settings - Document Types
  2. Create a new document type
  3. Verify that no error is shown in console

Copilot AI review requested due to automatic review settings November 28, 2025 09:06
Copilot finished reviewing on behalf of iOvergaard November 28, 2025 09:09
Copy link
Contributor

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 fixes a bug where URL objects were not properly handled when storing backoffice history. Following changes in #20928 that allowed URLs to be passed as objects, the _checkWillNavigateAway method needed to be updated to handle both string and URL object types.

Key Changes

  • Updated _checkWillNavigateAway method signature to accept string | URL parameter type
  • Added type guard to convert URL objects to strings using .href property before string operations

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.

2 participants