Skip to content

Commit

Permalink
Merge pull request #405 from mathjax/issue404
Browse files Browse the repository at this point in the history
Better handling of undefined tag class.  #404
  • Loading branch information
dpvc authored Jan 3, 2020
2 parents a0414c4 + c96017a commit 9197fd4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ts/input/tex/Tags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -651,7 +651,10 @@ export namespace TagsFactory {
* @return {Tags} The newly created object.
*/
export let create = function(name: string): Tags {
let constr = tagsMapping.get(name) || this.defaultTags;
let constr = tagsMapping.get(name) || tagsMapping.get(defaultTags);
if (!constr) {
throw Error('Unknown tags class');
}
return new constr();
};

Expand Down

0 comments on commit 9197fd4

Please sign in to comment.