Skip to content

Commit

Permalink
fixes #29 by adding a check that the backend exists before… (#30)
Browse files Browse the repository at this point in the history
* fixes #29 by adding a check that the backend exists before getting its name

* needed npm install and make setup does not exist
  • Loading branch information
ricopicone authored Mar 6, 2022
1 parent 567fa31 commit f25781a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```

Expand Down
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
6 changes: 4 additions & 2 deletions pseudocode.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
},
};

0 comments on commit f25781a

Please sign in to comment.