Skip to content

Commit 8d30a04

Browse files
committed
Make version check a little more robust.
1 parent 4fd69be commit 8d30a04

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

latest.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@
9696
var json = JSON.parse(request.responseText);
9797
if (json instanceof Array) json = json[0];
9898
var version = json[cdn.version];
99-
if (version.substr(0,1) === '2') {
99+
if (version.substr(0,2) === '2.') {
100100
setVersion(version);
101101
loadMathJax(cdn.mathjax + json[cdn.version] + unpacked + '/MathJax.js' + config);
102102
return;

unpacked/latest.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@
9696
var json = JSON.parse(request.responseText);
9797
if (json instanceof Array) json = json[0];
9898
var version = json[cdn.version];
99-
if (version.substr(0,1) === '2') {
99+
if (version.substr(0,2) === '2.') {
100100
setVersion(version);
101101
loadMathJax(cdn.mathjax + json[cdn.version] + unpacked + '/MathJax.js' + config);
102102
return;

0 commit comments

Comments
 (0)