www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 6830d889e8ee544198694298c44808ff7fb3b020
parent 4cce3df7b3d09d6178964f7f5f28e4c461ea1640
Author: Davide P. Cervone <dpvc@union.edu>
Date:   Wed, 15 Apr 2015 11:43:47 -0400

Add try/catch around initial browser setup, just in case there is an error.  See issue #1155.

Diffstat:
Munpacked/MathJax.js | 9++++++---
1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/unpacked/MathJax.js b/unpacked/MathJax.js @@ -3117,9 +3117,10 @@ MathJax.Hub.Startup = { }}; // - // Initial browser-specific info (e.g., touch up version or name) + // Initial browser-specific info (e.g., touch up version or name, check for MathPlayer, etc.) + // Wrap in try/catch just in case of error (see issue #1155). // - HUB.Browser.Select({ + try {HUB.Browser.Select({ Safari: function (browser) { var v = parseInt((String(browser.version).split("."))[0]); if (v > 85) {browser.webkit = browser.version} @@ -3195,7 +3196,9 @@ MathJax.Hub.Startup = { } catch (err) {} } } - }); + });} catch (err) { + console.error(err.message); + } HUB.Browser.Select(MathJax.Message.browsers); if (BASE.AuthorConfig && typeof BASE.AuthorConfig.AuthorInit === "function") {BASE.AuthorConfig.AuthorInit()}