Skip to content

Commit

Permalink
Merge pull request #39 from NotKyoyo/staging
Browse files Browse the repository at this point in the history
Staging
  • Loading branch information
NotKyoyo committed Oct 11, 2021
2 parents f5e998b + e51957a commit 06412af
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
8 changes: 3 additions & 5 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,17 @@ class AnimeFact extends EventEmitter {
const auth = this._auth;
if (!auth) throw new TypeError("Missing authorization token");
const params = {};
if (tags == undefined) {
if (tags === undefined) {
params.tags = "";
} else {
params.tags = tags;
}
if (minLength == undefined) {
if (minLength === undefined) {
params.minLength = "";
} else {
params.minLength = minLength;
}
if (maxLength == undefined) {
if (maxLength === undefined) {
params.maxLength = "";
} else {
params.maxLength = maxLength;
Expand All @@ -57,14 +57,12 @@ class AnimeFact extends EventEmitter {
body: res.body,
error: "Could not find any fact",
};
break;
case 502:
return {
statusCode: res.statusCode,
body: res.body,
error: "Server down",
};
break;
default:
return {
statusCode: res.statusCode,
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "anime-facts",
"version": "4.3.11",
"version": "4.3.12",
"description": "Generate random anime facts.",
"main": "index.js",
"types": "index.d.ts",
Expand Down

0 comments on commit 06412af

Please sign in to comment.