Skip to content
This repository was archived by the owner on Jan 4, 2021. It is now read-only.

Commit d5e2832

Browse files
author
steven.roulleau
committed
fix(export): when latex is only one number
1 parent 07a38e4 commit d5e2832

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

build/docs/myscript-math-exports.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,13 @@ class MyScriptMathExports extends PolymerElement {
9090
}
9191

9292
_getLatex(exports) {
93-
return exports ? exports['application/x-latex'] || exports.LATEX || exports.latex || '' : '';
93+
let exp = exports ? exports['application/x-latex'] || exports.LATEX || exports.latex || '' : ''; // In case we have only one number being recognize like 1
94+
95+
if (typeof exp === 'number') {
96+
exp = exp.toString();
97+
}
98+
99+
return exp;
94100
}
95101

96102
_getLatexCleaned(exports) {

myscript-math-exports.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,12 @@ class MyScriptMathExports extends PolymerElement {
8888
}
8989

9090
_getLatex(exports) {
91-
return exports ? exports['application/x-latex'] || exports.LATEX || exports.latex || '' : '';
91+
let exp = exports ? exports['application/x-latex'] || exports.LATEX || exports.latex || '' : '';
92+
// In case we have only one number being recognize like 1
93+
if (typeof exp === 'number') {
94+
exp = exp.toString();
95+
}
96+
return exp;
9297
}
9398

9499
_getLatexCleaned(exports) {

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy