Skip to content

Commit

Permalink
fix res.json
Browse files Browse the repository at this point in the history
  • Loading branch information
pedrouid committed Sep 24, 2018
1 parent 142e815 commit a5ff795
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 10 deletions.
2 changes: 1 addition & 1 deletion packages/walletconnect-core/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion packages/walletconnect-core/src/connector.js
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,12 @@ export default class Connector {
}

// get body
const response = await res.json()
let response = null

const text = await res.text()
if (text.length) {
response = JSON.parse(text)
}

return response
}
Expand Down
8 changes: 4 additions & 4 deletions packages/walletconnect-react-native/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions packages/walletconnect/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit a5ff795

Please sign in to comment.