File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed
src/content/pages/ranking Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ export function getUsername(
4646 } else {
4747 region = 'CN'
4848 }
49- username = a . pathname . split ( '/' ) . filter ( Boolean ) [ 1 ]
49+ username = a . pathname ? .split ( '/' ) . filter ( Boolean ) [ 1 ]
5050 } else {
5151 const a = row . children [ 1 ] . children [ 0 ] as HTMLAnchorElement
5252 if ( a . host === 'leetcode.com' ) {
@@ -74,10 +74,7 @@ export const useRowChange = (
7474 } , 100 )
7575 handleChange ( )
7676 const observer = new MutationObserver ( handleChange )
77- const a = beta
78- ? row . children [ 0 ] . children [ 0 ] . children [ 0 ] . children [ 0 ]
79- : row . children [ 1 ] . children [ 0 ]
80- observer . observe ( a , { attributes : true , childList : true } )
77+ observer . observe ( row , { attributes : true , childList : true } )
8178 return ( ) => {
8279 handleChange . cancel ( )
8380 observer . disconnect ( )
You can’t perform that action at this time.
0 commit comments