Skip to content

Commit

Permalink
Fixed model update
Browse files Browse the repository at this point in the history
  • Loading branch information
kg-bot committed Mar 21, 2019
1 parent 6b88daf commit 4ac8142
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Utils/Model.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public function update( $data = [] )

$responseData = json_decode( (string) $response->getBody() );

return new $this->modelClass( $this->request, $responseData->{$this->entity}[ 0 ] );
return new $this->modelClass( $this->request, $responseData->{str_singular( $this->entity )} );
} );
}

Expand Down

0 comments on commit 4ac8142

Please sign in to comment.