Skip to content

Commit 6ffe557

Browse files
committed
Fix toArray() calls
1 parent 77fe971 commit 6ffe557

23 files changed

+23
-23
lines changed

component/am2chtml-page

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ require('mathjax-full/' + (argv.dist ? 'es5' : 'components/src/startup') + '/sta
8888
MathJax.startup.promise.then(() => {
8989
const adaptor = MathJax.startup.adaptor;
9090
const html = MathJax.startup.document;
91-
if (html.math.toArray().length === 0) adaptor.remove(html.outputJax.chtmlStyles);
91+
if (Array.from(html.math).length === 0) adaptor.remove(html.outputJax.chtmlStyles);
9292
console.log(adaptor.doctype(html.document));
9393
console.log(adaptor.outerHTML(adaptor.root(html.document)));
9494
}).catch(err => console.log(err));

component/mml2chtml-page

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ require('mathjax-full/' + (argv.dist ? 'es5' : 'components/src/mml-chtml') + '/m
8888
MathJax.startup.promise.then(() => {
8989
const adaptor = MathJax.startup.adaptor;
9090
const html = MathJax.startup.document;
91-
if (html.math.toArray().length === 0) adaptor.remove(html.outputJax.chtmlStyles);
91+
if (Array.from(html.math).length === 0) adaptor.remove(html.outputJax.chtmlStyles);
9292
console.log(adaptor.doctype(html.document));
9393
console.log(adaptor.outerHTML(adaptor.root(html.document)));
9494
}).catch(err => console.log(err));

component/mml2svg-page

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ require('mathjax-full/' + (argv.dist ? 'es5' : 'components/src/mml-svg') + '/mml
8888
MathJax.startup.promise.then(() => {
8989
const adaptor = MathJax.startup.adaptor;
9090
const html = MathJax.startup.document;
91-
if (html.math.toArray().length === 0) {
91+
if (Array.from(html.math).length === 0) {
9292
adaptor.remove(html.outputJax.svgStyles);
9393
const cache = adaptor.elementById(adaptor.body(html.document), 'MJX-SVG-global-cache');
9494
if (cache) adaptor.remove(cache);

component/tex2chtml-page

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ require('mathjax-full/' + (argv.dist ? 'es5' : 'components/src/tex-chtml') + '/t
100100
MathJax.startup.promise.then(() => {
101101
const adaptor = MathJax.startup.adaptor;
102102
const html = MathJax.startup.document;
103-
if (html.math.toArray().length === 0) adaptor.remove(html.outputJax.chtmlStyles);
103+
if (Array.from(html.math).length === 0) adaptor.remove(html.outputJax.chtmlStyles);
104104
console.log(adaptor.doctype(html.document));
105105
console.log(adaptor.outerHTML(adaptor.root(html.document)));
106106
}).catch(err => console.log(err));

component/tex2svg-page

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ require('mathjax-full/' + (argv.dist ? 'es5' : 'components/src/tex-svg') + '/tex
100100
MathJax.startup.promise.then(() => {
101101
const adaptor = MathJax.startup.adaptor;
102102
const html = MathJax.startup.document;
103-
if (html.math.toArray().length === 0) {
103+
if (Array.from(html.math).length === 0) {
104104
adaptor.remove(html.outputJax.svgStyles);
105105
const cache = adaptor.elementById(adaptor.body(html.document), 'MJX-SVG-global-cache');
106106
if (cache) adaptor.remove(cache);

direct/am2chtml-page

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ html.render();
8383
//
8484
// If no math was found on the page, remove the stylesheet
8585
//
86-
if (html.math.toArray().length === 0) adaptor.remove(html.outputJax.chtmlStyles);
86+
if (Array.from(html.math).length === 0) adaptor.remove(html.outputJax.chtmlStyles);
8787

8888
//
8989
// Output the resulting HTML

direct/mml2chtml-page

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ html.render();
8383
//
8484
// If no math was found on the page, remove the stylesheet
8585
//
86-
if (html.math.toArray().length === 0) adaptor.remove(html.outputJax.chtmlStyles);
86+
if (Array.from(html.math).length === 0) adaptor.remove(html.outputJax.chtmlStyles);
8787

8888
//
8989
// Output the resulting HTML

direct/mml2svg-page

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ html.render();
8383
//
8484
// If no math was found on the page, remove the stylesheet and font cache (if any)
8585
//
86-
if (html.math.toArray().length === 0) {
86+
if (Array.from(html.math).length === 0) {
8787
adaptor.remove(html.outputJax.svgStyles);
8888
const cache = adaptor.elementById(adaptor.body(html.document), 'MJX-SVG-global-cache');
8989
if (cache) adaptor.remove(cache);

direct/tex2chtml-page

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ html.render();
8989
//
9090
// If no math was found on the page, remove the stylesheet
9191
//
92-
if (html.math.toArray().length === 0) adaptor.remove(html.outputJax.chtmlStyles);
92+
if (Array.from(html.math).length === 0) adaptor.remove(html.outputJax.chtmlStyles);
9393

9494
//
9595
// Output the resulting HTML

direct/tex2svg-page

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ html.render();
8989
//
9090
// If no math was found on the page, remove the stylesheet and font cache (if any)
9191
//
92-
if (html.math.toArray().length === 0) {
92+
if (Array.from(html.math).length === 0) {
9393
adaptor.remove(html.outputJax.svgStyles);
9494
const cache = adaptor.elementById(adaptor.body(html.document), 'MJX-SVG-global-cache');
9595
if (cache) adaptor.remove(cache);

0 commit comments

Comments
 (0)