diff --git a/README.md b/README.md index 2b50643..28dcb1f 100644 --- a/README.md +++ b/README.md @@ -272,7 +272,7 @@ To compile the project on Ubuntu Linux, run the following commands in terminal: ```bash cd pseudocode.js/ -make setup +npm install make ``` diff --git a/package.json b/package.json index dc9ae62..0946925 100644 --- a/package.json +++ b/package.json @@ -21,10 +21,12 @@ "devDependencies": { "browserify": "^13.3.0", "clean-css-cli": "^4.0.0", - "eslint": "^7.0.0", + "eslint": "^7.32.0", "katex": "^0.8.0", "uglify-js": "^3.6.0", - "watchify": "^3.9.0" + "watchify": "^3.11.1", + "clean-css": "^5.2.4", + "uglifyjs": "^2.4.11" }, "license": "MIT" } diff --git a/pseudocode.js b/pseudocode.js index 5e467d0..d7bb00e 100644 --- a/pseudocode.js +++ b/pseudocode.js @@ -60,8 +60,10 @@ module.exports = { var newElem = renderer.toDOM(); elem.replaceWith(newElem); - if (renderer.backend.name === 'mathjax') { - mathjaxTypeset(newElem); + if (renderer.backend) { + if (renderer.backend.name === 'mathjax') { + mathjaxTypeset(newElem); + } } }, };