File tree Expand file tree Collapse file tree 2 files changed +3
-15
lines changed
packages/signals/signals/src/core/signal-generators/dom-gen Expand file tree Collapse file tree 2 files changed +3
-15
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ import { OnNavigationEventGenerator } from '../navigation-gen'
66
77const originalLocation = window . location
88
9- describe ( ' OnNavigationEventGenerator' , ( ) => {
9+ describe ( OnNavigationEventGenerator , ( ) => {
1010 let emitter : SignalEmitter
1111 let emitSpy : jest . SpiedFunction < SignalEmitter [ 'emit' ] >
1212
Original file line number Diff line number Diff line change @@ -6,25 +6,13 @@ import { SignalGenerator } from '../types'
66
77function getURLDifferences ( url1 : URL , url2 : URL ) : ChangedProperties [ ] {
88 const changed : ChangedProperties [ ] = [ ]
9- const propertiesToCompare : ( keyof URL ) [ ] = [
10- 'href' ,
11- 'protocol' ,
12- 'host' ,
13- 'hostname' ,
14- 'port' ,
15- 'pathname' ,
16- 'search' ,
17- 'hash' ,
18- 'username' ,
19- 'password' ,
20- ]
9+ const propertiesToCompare : ( keyof URL ) [ ] = [ 'pathname' , 'search' , 'hash' ]
2110
2211 for ( const property of propertiesToCompare ) {
2312 if ( url1 [ property ] !== url2 [ property ] ) {
2413 if ( property === 'pathname' ) {
2514 changed . push ( 'path' )
26- }
27- if ( [ 'search' , 'hash' ] . includes ( property ) ) {
15+ } else {
2816 changed . push ( property as ChangedProperties )
2917 }
3018 }
You can’t perform that action at this time.
0 commit comments