Skip to content

Commit

Permalink
Change call order
Browse files Browse the repository at this point in the history
So that the JSON object is displayed properly in the logs.
  • Loading branch information
mattv8 committed Mar 14, 2022
1 parent 86bd073 commit 8314487
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -331,10 +331,11 @@ function initialSetup() {
canBeFlashed (bool)
supportsChat (bool)
*/
obj = JSON.parse(String(obj)); //Re-parse JSON

logger(`Received JSON object: ${obj}`); //To make it easier for devs to verify the JSON objects they're sending

obj = JSON.parse(String(obj)); //Re-parse JSON

let deviceId = obj.deviceId;
let device = GetDeviceByDeviceId(deviceId);
let oldDeviceId = null;
Expand Down

0 comments on commit 8314487

Please sign in to comment.