Skip to content

Commit

Permalink
lint code
Browse files Browse the repository at this point in the history
  • Loading branch information
JeanExtreme002 committed Dec 22, 2023
1 parent 7c3fd49 commit d51cda1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion nodejs/FlightRadar24/entities/flight.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
8 changes: 3 additions & 5 deletions nodejs/FlightRadar24/request.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit d51cda1

Please sign in to comment.