Commit 282274a
authored
fixed issue with p5.Score that prevented 'parts' from being passed as argument (#543)
This is related to an issue here: #529
It doesn't look like p5.Score is currently functional because it fails to fill the 'parts' array with the function arguments, due to a conditional that doesn't seem to be necessary.
With this said, is there a way to provide a better error message to provide when p5.Score is missing phrases? Currently when p5.Score is provided no arguments, it returns Cannot read property 'start' of undefined. I imagine just checking if the function call has any arguments would be enough, but not sure if there is a case where that needs to be allowed.
Also, I would be happy to work on converting this to es6 and writing out some tests, if that would be helpful for this class.1 parent 22d3ea5 commit 282274a
1 file changed
+7
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
387 | 387 | | |
388 | 388 | | |
389 | 389 | | |
390 | | - | |
| 390 | + | |
391 | 391 | | |
392 | 392 | | |
393 | 393 | | |
394 | | - | |
395 | | - | |
396 | | - | |
397 | | - | |
398 | | - | |
399 | | - | |
400 | | - | |
401 | | - | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
402 | 400 | | |
403 | 401 | | |
404 | 402 | | |
| |||
0 commit comments