@@ -11,7 +11,7 @@ import type {
1111 ContextNavigationSkippedDetail ,
1212} from './types' ;
1313import type { ContextNavigationEventSource } from './create-context-navigation-plugin' ;
14- import { normalizePath } from './helpers' ;
14+ import { normalizePathFromURL } from './helpers' ;
1515
1616/**
1717 * Set of normalized paths that the plugin itself has navigated to.
@@ -118,7 +118,7 @@ export async function applyNavigation(
118118 // Step 2: Compare normalized paths to avoid redundant navigations.
119119 // This prevents a replace() call when the URL is already correct, which
120120 // would otherwise create a spurious history entry in some browsers.
121- if ( normalizePath ( targetURL ) === normalizePath ( currentURL ) ) {
121+ if ( normalizePathFromURL ( targetURL ) === normalizePathFromURL ( currentURL ) ) {
122122 event . dispatchEvent ( 'onContextNavigationSkipped' , {
123123 detail : { appKey, reason : 'url-matches' } as ContextNavigationSkippedDetail ,
124124 source : eventSource ,
@@ -156,7 +156,7 @@ export async function applyNavigation(
156156
157157 // Step 4: Record the token BEFORE navigating so the guard sees it
158158 // on the resulting state$ emission and skips re-processing.
159- ownNavTokens . add ( normalizePath ( targetURL ) ) ;
159+ ownNavTokens . add ( normalizePathFromURL ( targetURL ) ) ;
160160 navigation . navigate ( targetURL , navOptionsOverride ?? config . navigationOptions ) ;
161161
162162 // Post-navigation bookkeeping: notify listeners and invoke callback.
0 commit comments