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

Crashing rendering for \text{constructor} #2283

Closed
OlgaRedozubova opened this issue Jan 4, 2020 · 4 comments
Closed

Crashing rendering for \text{constructor} #2283

OlgaRedozubova opened this issue Jan 4, 2020 · 4 comments
Labels
Accepted Issue has been reproduced by MathJax team Fixed Test Needed v3.0

Comments

@OlgaRedozubova
Copy link

screenshot-mathjax github io-2020 01 04-13_05_02

@OlgaRedozubova
Copy link
Author

Also, this error will happen with:
constructor, hasOwnProperty, isPrototypeOf, propertyIsEnumerable, toLocaleString, toString, valueOf, __proto__, ...

@OlgaRedozubova
Copy link
Author

Possible solution to this problem change:

let list = this.nodeLists[property];

on

    let list;
    for(const key of Object.keys(this.nodeLists)){
      if(key === property){
        list = this.nodeLists[property];
        break;
      }
    }

In this function https://github.com/mathjax/MathJax-src/blob/master/ts/input/tex/ParseOptions.ts#L164-L170

@dpvc
Copy link
Member

dpvc commented Jan 4, 2020

Thanks for the suggested fix. It is actually the fact that addNode() is being called when it shouldn't be, so the solution actually lies in NodeFactory.ts. I will make a pull request with a fix.

@OlgaRedozubova
Copy link
Author

Thanks for your answer, looking forward to your update.

dpvc added a commit to mathjax/MathJax-src that referenced this issue Jan 9, 2020
@dpvc dpvc added Accepted Issue has been reproduced by MathJax team Ready for Review Test Needed labels Jan 9, 2020
dpvc added a commit to mathjax/MathJax-src that referenced this issue Jan 23, 2020
@dpvc dpvc added Merged Merged into develop branch and removed Ready for Review labels Jan 23, 2020
@dpvc dpvc added this to the MathJax v3.0.1 milestone Feb 5, 2020
@dpvc dpvc added Fixed v3.0 and removed Merged Merged into develop branch labels Feb 10, 2020
@dpvc dpvc closed this as completed Feb 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Accepted Issue has been reproduced by MathJax team Fixed Test Needed v3.0
Projects
None yet
Development

No branches or pull requests

2 participants