Skip to content

Commit

Permalink
force response to text if not json
Browse files Browse the repository at this point in the history
Without that I'm getting Version "[object Response]" on the smart card
from an api that returns text/plain.

See #847 - add Docuseal (requires text/plain support or hack)
  • Loading branch information
meonkeys authored and bastienwirtz committed Jan 5, 2025
1 parent 2f1cbe7 commit aba3b5e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/mixins/service.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export default {
throw new Error(`Ping: target not available (${response.status} error)`);
}

return json ? response.json() : response;
return json ? response.json() : response.text();
});
},
},
Expand Down

0 comments on commit aba3b5e

Please sign in to comment.