Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: return early on textnodes #41

Closed
wants to merge 1 commit into from
Closed

Conversation

pkra
Copy link

@pkra pkra commented Sep 23, 2021

Avoids errors when removeSemanticData encounters text node.

Avoids errors when removeSemanticData encounters text nodes.
@pkra pkra mentioned this pull request Sep 23, 2021
@@ -8,6 +8,7 @@ const {STATE} = require('mathjax-full/js/core/MathItem.js');
//
function removeSemanticData(math) {
math.root.walkTree(node => {
if (!node.attributes) return;
Copy link
Member

Choose a reason for hiding this comment

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

This will never fire as all nodes that implement MmlNode have an attributes field.
TextNode inherits from AbstractMmlEmptyNode, hence implements MmlNode.

@pkra pkra closed this Jun 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants