ffd8 / P5LIVE

p5.js collaborative live-coding vj environment!
https://p5live.org
GNU General Public License v3.0
226 stars 35 forks source link

Fix error in counting open/close braces #22

Closed JunShern closed 4 years ago

JunShern commented 4 years ago

Change from else if to if. The same line can have both '{' and '}' characters, for example:

} else if (true) {

In the above case, if we use 'else if' then we will miss counting the '}' and therefore our function will not close correctly.

ffd8 commented 4 years ago

Aha good catch! True true.. hadn't considered a single line function = that's some minimal + modular function writing!?