Skip to content
This repository has been archived by the owner on Sep 28, 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")

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

Successfully merging this pull request may close these issues.

2 participants