From 7c459aef1a74a35df40504ea28f3a0a2ad66cb79 Mon Sep 17 00:00:00 2001 From: Laura Fuentes Grau Date: Fri, 23 Oct 2020 12:56:35 +0200 Subject: [PATCH] resolved warning --- src/common/api/rest-api.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/api/rest-api.js b/src/common/api/rest-api.js index 76eabe3..5667ead 100644 --- a/src/common/api/rest-api.js +++ b/src/common/api/rest-api.js @@ -36,9 +36,9 @@ const REQUEST_TIMEOUT_NOTIFICATION = { // Can be used for the rest of requests function isNetworkError(err) { let result = false; - + // If not status nor response fields, it is a network error. TODO: Handle timeouts - if (err.status == null || err.status == 500 || err.response == null) { + if (err.status == null || err.status === 500 || err.response == null) { result = true; let notification = err.timeout? REQUEST_TIMEOUT_NOTIFICATION : SERVER_NOT_REACHABLE_NOTIFICATION;