From d51cda1cbb45c048c3cf8b2732719a5c68106033 Mon Sep 17 00:00:00 2001 From: JeanExtreme002 Date: Fri, 22 Dec 2023 01:36:15 -0300 Subject: [PATCH] lint code --- nodejs/FlightRadar24/entities/flight.js | 2 +- nodejs/FlightRadar24/request.js | 8 +++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/nodejs/FlightRadar24/entities/flight.js b/nodejs/FlightRadar24/entities/flight.js index cdb1802..f0fce7d 100644 --- a/nodejs/FlightRadar24/entities/flight.js +++ b/nodejs/FlightRadar24/entities/flight.js @@ -57,7 +57,7 @@ class Flight extends Entity { // Separate the comparison prefix if it exists. if ((prefix === "max") || (prefix === "min")) { - key = key[3].toLowerCase() + key.slice(4, key.length) + key = key[3].toLowerCase() + key.slice(4, key.length); } else { prefix = null; } diff --git a/nodejs/FlightRadar24/request.js b/nodejs/FlightRadar24/request.js index 916fa53..04cc9af 100644 --- a/nodejs/FlightRadar24/request.js +++ b/nodejs/FlightRadar24/request.js @@ -94,17 +94,15 @@ class APIRequest { if (this.__content !== null) { return this.__content; } - + let contentType = this.getHeaders()["content-type"]; contentType = contentType == null ? "" : contentType; if (contentType.includes("application/json")) { this.__content = await this.__response.json(); - } - else if (contentType.includes("text")) { + } else if (contentType.includes("text")) { this.__content = await this.__response.text(); - } - else { + } else { this.__content = await this.__response.arrayBuffer(); } return this.__content;