File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
packages/lit-dev-content/src/pages Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -95,13 +95,14 @@ const initChipsFromURL = async (hash = window.location.hash) => {
95
95
( chip as FilterChip ) . selected =
96
96
kinds . length === 0 || kinds . includes ( chipKind ) ;
97
97
} ) ;
98
+
99
+ // Do not update hash to prevent an infinite loop.
100
+ updateContentFromChips ( false ) ;
98
101
} ;
99
102
100
- // Handles forwads and back navigation between hashes
103
+ // Handle forwards and back navigation between hashes
101
104
window . addEventListener ( 'hashchange' , async ( event : HashChangeEvent ) => {
102
105
await initChipsFromURL ( new URL ( event . newURL ) . hash ) ;
103
- // Do not update hash to prevent an infinite loop.
104
- await updateContentFromChips ( false ) ;
105
106
} ) ;
106
107
107
108
// Handles clicking a filter chip.
You can’t perform that action at this time.
0 commit comments