Skip to content

Commit

Permalink
fix: empty error message for fetch errors
Browse files Browse the repository at this point in the history
  • Loading branch information
ayZagen committed Apr 21, 2024
1 parent 1e18794 commit e2b0ec5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions dev.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ window['PlusAuth'] = {
{ name: 'Turkce', value: 'tr' },
{ name: 'English', value: 'en' },
],
params: {
state: '018f00d8-bfd5-731a-b23f-738dfdd28b40'
},
client: {
clientName: 'TestApp',
tosUri: 'https://sometosuri.com',
Expand Down
2 changes: 1 addition & 1 deletion src/ui/utils/fetch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export function createFetchWrapper(baseUrl?: string) {
response = JSON.parse(value)
} else {
// noinspection JSPrimitiveTypeWrapperUsage
response = new String(value)
response = value && new String(value)
}
if (rawResponse.ok) {
resolve(response)
Expand Down

0 comments on commit e2b0ec5

Please sign in to comment.