Skip to content

Commit

Permalink
move argstring assignment out of try block
Browse files Browse the repository at this point in the history
  • Loading branch information
Kos-M committed Jan 26, 2023
1 parent 06b3751 commit 73c41d7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -335,8 +335,8 @@ function onMessage(bugout, identifier, wire, message) {
} else if (packet.y == "r") { // rpc call
debug("rpc", identifier, packet);
var call = packet.c.toString();
var argsstring = packet["a"] ? packet.a.toString() : "null";
try {
var argsstring = packet["a"] ? packet.a.toString() : "null";
var args = JSON.parse(argsstring);
} catch(e) {
var args = null;
Expand Down

0 comments on commit 73c41d7

Please sign in to comment.