Skip to content

Commit

Permalink
fix response.ok check
Browse files Browse the repository at this point in the history
  • Loading branch information
10xSebastian committed Apr 19, 2022
1 parent ec57507 commit 8f29d8e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion dist/esm/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ var getAssets = async (options) => {
fetch(`https://public.depay.fi/accounts/${blockchain}/${address}/assets`, { signal: controller.signal })
.catch((error) => { console.log(error); resolve([]); })
.then((response) => {
if(response && response.success) {
if(response && response.ok) {
return response.json()
} else {
resolve([]);
Expand Down
2 changes: 1 addition & 1 deletion dist/umd/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
fetch(`https://public.depay.fi/accounts/${blockchain}/${address}/assets`, { signal: controller.signal })
.catch((error) => { console.log(error); resolve([]); })
.then((response) => {
if(response && response.success) {
if(response && response.ok) {
return response.json()
} else {
resolve([]);
Expand Down
2 changes: 1 addition & 1 deletion src/getAssets.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export default async (options) => {
fetch(`https://public.depay.fi/accounts/${blockchain}/${address}/assets`, { signal: controller.signal })
.catch((error) => { console.log(error); resolve([]) })
.then((response) => {
if(response && response.success) {
if(response && response.ok) {
return response.json()
} else {
resolve([])
Expand Down

0 comments on commit 8f29d8e

Please sign in to comment.