File tree Expand file tree Collapse file tree
src/ui/devtools/components Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -23,6 +23,19 @@ export function DynamicPerSiteEditor(props: DevtoolsProps): Malevic.Child {
2323 store . fixesLength = fixesText . length ;
2424 }
2525
26+ if ( store . currentFix && ! store . fixes . includes ( store . currentFix ) ) {
27+ const u1 = store . currentFix . url ;
28+ const sameURLFix = store . fixes . find ( ( f ) => {
29+ const u2 = f . url ;
30+ return u1 . length === u2 . length && u1 . every ( ( u , i ) => u === u2 [ i ] ) ;
31+ } ) ;
32+ if ( sameURLFix ) {
33+ store . currentFix = sameURLFix ;
34+ } else {
35+ store . currentFix = null ;
36+ }
37+ }
38+
2639 function onSearchInput ( e : Event ) {
2740 const element = e . target as HTMLInputElement ;
2841 store . search = element . value ;
@@ -40,7 +53,7 @@ export function DynamicPerSiteEditor(props: DevtoolsProps): Malevic.Child {
4053 </ div >
4154 < list class = "dynamic-per-site__urls" >
4255 { filteredFixes . map ( ( fix ) => {
43- const text = fix . url . join ( ', ' ) ;
56+ const text = fix . url . join ( ' ' ) ;
4457 return < li >
4558 < Button
4659 class = { {
You can’t perform that action at this time.
0 commit comments