I am trying to copy the example in the readme, with the following code, but I get the error: this.client is undefined. If I change this.client to client it works fine.
import RailsRanger from 'rails-ranger';
const client = new RailsRanger;
export default {
client,
orders: {
update(params) {
return this.client.update('orders', params) // <-- error on this line
.then(response => response.data)
}
}
};
I am trying to copy the example in the readme, with the following code, but I get the error: this.client is undefined. If I change
this.client
toclient
it works fine.