Skip to content

Conversation

@webJose
Copy link
Contributor

@webJose webJose commented Sep 7, 2025

No description provided.

@webJose webJose requested a review from Copilot September 7, 2025 07:30
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 adds state validation to the LocationFull class to ensure that only conformant state objects are passed to the browser's history API. When non-conformant state is detected, it logs a warning and preserves the previous valid state instead.

  • Imports and uses the isConformantState function to validate state objects before they reach the history API
  • Updates error handling in navigation cancellation to use event.state instead of the raw state parameter
  • Adds comprehensive test coverage for the new validation behavior and improves existing test cleanup

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/lib/core/LocationFull.ts Adds state validation logic and imports the validation function
src/lib/core/LocationFull.test.ts Removes unused import, improves test cleanup, and adds tests for state validation

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@webJose webJose merged commit be50968 into main Sep 7, 2025
1 check passed
@webJose webJose deleted the JP/LocationFullFix branch September 7, 2025 07:34
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.

2 participants