Skip to content

Commit

Permalink
chore: removed dangling _ from traversal
Browse files Browse the repository at this point in the history
  • Loading branch information
simon-scherzinger committed Jan 26, 2017
1 parent 1ca60f9 commit 0b0ad12
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/resources/Resource.js
Expand Up @@ -36,9 +36,9 @@ export default class Resource {
this.events = events;

if (traversal) {
this._traversal = traversal;
this.traversal = traversal;
} else {
this._traversal = traverson.from(this.resource.link('self').href).jsonHal()
this.traversal = traverson.from(this.resource.link('self').href).jsonHal()
.addRequestOptions({ headers: { Accept: 'application/hal+json' } });
}
}
Expand All @@ -54,10 +54,10 @@ export default class Resource {
* @returns {Object} traverson request builder instance.
*/
newRequest() {
if ({}.hasOwnProperty.call(this._traversal, 'continue')) {
return this._traversal.continue().newRequest();
if ({}.hasOwnProperty.call(this.traversal, 'continue')) {
return this.traversal.continue().newRequest();
}
return this._traversal.newRequest();
return this.traversal.newRequest();
}

/**
Expand Down

0 comments on commit 0b0ad12

Please sign in to comment.