Skip to content

Instantly share code, notes, and snippets.

@skflowne
Created May 15, 2020 13:14
Show Gist options
  • Save skflowne/1c4595ddf0d47408ea928e2a07a5fbdc to your computer and use it in GitHub Desktop.
Save skflowne/1c4595ddf0d47408ea928e2a07a5fbdc to your computer and use it in GitHub Desktop.
if (
ast.html &&
ast.html.children &&
ast.html.children[1] &&
ast.html.children[1].children &&
ast.html.children[1].children[3] &&
ast.html.children[1].children[3].attributes
) {
console.log(
"main children",
ast.html.children[1].children[3].attributes[0]
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment