Skip to content

Commit

Permalink
Don't bother returning false if we're just going to check for the dat…
Browse files Browse the repository at this point in the history
…a property
  • Loading branch information
krainboltgreene committed Apr 30, 2019
1 parent 1069ff1 commit d1c85c9
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions addon/utils/serialize-and-push.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,7 @@ function isValidResponse(doc: any): doc is DocWithData {
console.debug("Received a repsonse that doesn't have a /jsonapi/version property")

// Don't even bother if the data propery doesn't exist
if (typeof doc.data === 'undefined') {
return false
}

console.debug("Received a repsonse that doesn't have a /data property")

return false
return typeof response.data === 'undefined';
}

export default function serializeAndPush(this: Model, response: any) {
Expand Down

0 comments on commit d1c85c9

Please sign in to comment.