Closed Kos-M closed 1 year ago
@Kos-M good point, thanks for catching this. I think the best thing to do is check for args == undefined || args == null
in the RPC receiving code and then don't run toString
if it is undefined
or null
.
If you or somebody else submits a PR with a) a fix b) updated tests to catch this case, I'll merge it. Thanks!
Sure , you welcome . Maybe ill fix it this weekend. Im using this project in 2 different side projects im currenlty developing , so expect more issues from me if find anything else , to imrpove it more :)
Noticed all tests are in one single file , would it be better to seperate tests by test entity to each own file ( maybe in a folder) ? For example rpc.test.js , torrent.test.js
I'm not sure about separating things out. In general I'd prefer a PR that does one small thing at a time so it's easy to check.
No , i didnt mean to modify /seperate tests now , maybe in feature some time..
Hello , If you dont specify any arg in rpc call like this:
you end up with error on remote peer (destination of rpc call)
I think it should have a default empty object if user not specify args..