Skip to content

Commit

Permalink
Merge pull request #29 from aidan-casey/master
Browse files Browse the repository at this point in the history
Added check for empty response
  • Loading branch information
milroyfraser committed Oct 17, 2019
2 parents ee564ac + b5b7753 commit 7765196
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Model.js
Expand Up @@ -102,6 +102,10 @@ export default class Model {

let response = await this.request(config)

if (response.status === 204) {
return this.respond(this.clone())
}

return this.respond(response.data)
}

Expand Down

0 comments on commit 7765196

Please sign in to comment.