We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c0c8045 commit 7e32285Copy full SHA for 7e32285
src/content/pages/ranking/utils.ts
@@ -46,7 +46,7 @@ export function getUsername(
46
} else {
47
region = 'CN'
48
}
49
- username = a.pathname.split('/').filter(Boolean)[1]
+ username = a.pathname?.split('/').filter(Boolean)[1]
50
51
const a = row.children[1].children[0] as HTMLAnchorElement
52
if (a.host === 'leetcode.com') {
@@ -74,10 +74,7 @@ export const useRowChange = (
74
}, 100)
75
handleChange()
76
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 })
+ observer.observe(row, { attributes: true, childList: true })
81
return () => {
82
handleChange.cancel()
83
observer.disconnect()
0 commit comments