Skip to content

Commit 57f04a7

Browse files
committed
update comparisons
1 parent e7ff3ad commit 57f04a7

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/amadeus/client/listener.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,8 @@ class Listener {
114114
errorFor({statusCode, parsed}) {
115115
let error = null;
116116
if (statusCode >= 500) { error = ServerError; }
117-
else if (statusCode == 401) { error = AuthenticationError; }
118-
else if (statusCode == 404) { error = NotFoundError; }
117+
else if (statusCode === 401) { error = AuthenticationError; }
118+
else if (statusCode === 404) { error = NotFoundError; }
119119
else if (statusCode >= 400) { error = ClientError; }
120120
else if (!parsed) { error = ParserError; }
121121
else { error = UnknownError; }

src/amadeus/client/response.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ class Response {
4545
*/
4646
parse() {
4747
try {
48-
if (this.statusCode == 204) {
48+
if (this.statusCode === 204) {
4949
return;
5050
}
5151
if (this.isJson()) {
@@ -68,7 +68,7 @@ class Response {
6868
* @protected
6969
*/
7070
success() {
71-
if (this.statusCode == 204) {
71+
if (this.statusCode = 204) {
7272
return true;
7373
}
7474
if (this.parsed && this.statusCode < 300) {

0 commit comments

Comments
 (0)