SaswatPadhi / pseudocode.js

Beautiful pseudocode for the Web
https://saswatpadhi.github.io/pseudocode.js
MIT License
224 stars 33 forks source link

renderElement TypeError when backend doesn't exist #29

Closed ricopicone closed 2 years ago

ricopicone commented 2 years ago

I'm getting the following error. image

I'm using URLSearchParams like that visible in the error, ?TS=T1&DS=, and it seems this might be where the trouble lies. Interestingly, the algorithm still renders properly.

Any ideas?

ricopicone commented 2 years ago

Sorry, the obscured part reads read properties of undefined (reading 'name') at Object.renderElement

ricopicone commented 2 years ago

Update: only the first algorithm to appear on the page renders properly, which makes sense because it looks like it's an error in a for loop.

ricopicone commented 2 years ago

The PR above fixes the issue, which in the end had nothing to do with the url search parameters. Rather, no renderer.backend existed, so renderer.backend.name gave the error.

SaswatPadhi commented 2 years ago

Many thanks for debugging this issue and for the PR!

ricopicone commented 2 years ago

My pleasure!