Open IsraaSulaiman opened 5 years ago
In the fetch file:
if (JSON.parse(xhr.responseText))
I'm not sure if this really works. I tried to print "hi" within its block when the response is not jason but it did not print anything.
I recommend you use this code:
if(xhr.getResponseHeader('content-type') !=='application/json'){ cb(`No Valid Data`);
In the fetch file:
I'm not sure if this really works. I tried to print "hi" within its block when the response is not jason but it did not print anything.
I recommend you use this code: