Skip to content
This repository was archived by the owner on Dec 24, 2024. It is now read-only.

fix: fix undefined variable targetId #120

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

vermaysha
Copy link

I'm not sure if this fix is necessary or not, but since I'm not comfortable looking at the console.log which has a lot of error messages, I made this fix.

image

@@ -159,7 +159,7 @@
sponsor?.forEach((element) => {
if (element.getAttribute("id") === "panels") {
element.childNodes?.forEach((childElement) => {
if (childElement.data.targetId && childElement.data.targetId !=="engagement-panel-macro-markers-description-chapters")
if (childElement.data?.targetId && childElement.data.targetId !=="engagement-panel-macro-markers-description-chapters")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (childElement.data?.targetId && childElement.data.targetId !=="engagement-panel-macro-markers-description-chapters")
if (childElement?.data?.targetId !=="engagement-panel-macro-markers-description-chapters")

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants