Skip to content

Commit

Permalink
fetchService hasJson fix
Browse files Browse the repository at this point in the history
  • Loading branch information
WingSMC committed Mar 12, 2021
1 parent 53093d6 commit c8ef5f1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/data/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,10 @@ export default new Vuex.Store({
let resData: any;
const contentType = response.headers.get("content-type");
const hasJson = contentType?.indexOf("application/json");
if (hasJson && hasJson !== -1) {
console.log(contentType?.indexOf("application/json"));

if (hasJson! > -1) {
resData = await response?.json();

if (resData?.message) {
commit("ADD_TOAST", {
message: resData.message,
Expand Down

0 comments on commit c8ef5f1

Please sign in to comment.