Skip to content

Commit

Permalink
Merge pull request #89 from wseagar/hotfix/change_dom_element_nestedness
Browse files Browse the repository at this point in the history
Hotfix/change dom element nestedness
  • Loading branch information
wseagar authored Mar 16, 2023
2 parents aafcfc8 + 95ba8ba commit 04b6d31
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions script.js
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ const trackingBlueChecksProvidesDetails = new Set()
function evaluateBlueCheck() {
for (const blueCheckComponent of trackingBlueChecks.values()) {
try {
const nestedProps = getReactProps(blueCheckComponent.parentElement.parentElement.parentElement, blueCheckComponent)
const nestedProps = getReactProps(blueCheckComponent.parentElement.parentElement.parentElement, blueCheckComponent.parentElement)

if (!nestedProps) {
// some components don't have nested props,
Expand Down Expand Up @@ -357,7 +357,8 @@ function evaluateBlueCheckProvidesDetails() {
for (const blueCheckEl of trackingBlueChecksProvidesDetails.values()) {
const blueCheckComponent = blueCheckEl.parentElement
try {
const nestedProps = getReactProps(blueCheckComponent.parentElement.parentElement.parentElement.parentElement, blueCheckComponent)
const nestedPropsOnEl = getReactProps(blueCheckComponent.parentElement.parentElement, blueCheckComponent.parentElement)
const nestedProps = nestedPropsOnEl.children[0][0].props

const changeTarget = blueCheckComponent.querySelector(`[aria-label="${VERIFIED_ACCOUNT_ARIA_LABEL}"]`)

Expand Down

0 comments on commit 04b6d31

Please sign in to comment.