1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/web/ synced 2025-03-09 00:00:01 +01:00

resolved warning

This commit is contained in:
Laura Fuentes Grau 2020-10-23 12:56:35 +02:00
parent de259acf45
commit 7c459aef1a

View file

@ -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;