Skip to content

Commit

Permalink
One getActions was not remove SFINT-2544 (#51)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremierobert-coveo committed Oct 30, 2019
1 parent 8c32a10 commit 308575b
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/components/UserActions/UserActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,6 @@ export class UserActions extends Component {
return;
}

(get(this.root, UserProfileModel) as UserProfileModel)
.getActions(this.options.userId)
.then(actions => (actions.length > 0 ? this.render() : this.renderNoActions()))
.catch(() => this.renderNoActions());

if (this.options.viewedByCustomer) {
this.showViewedByCustomer();
}
Expand Down Expand Up @@ -143,7 +138,7 @@ export class UserActions extends Component {
(get(this.root, UserProfileModel) as UserProfileModel)
.getActions(this.options.userId)
.then(actions => (actions.length > 0 ? this.render() : this.renderNoActions()))
.catch(e => (e.statusCode === 404 ? this.renderEnablePrompt() : this.renderNoActions()));
.catch(e => (e && e.statusCode === 404 ? this.renderEnablePrompt() : this.renderNoActions()));

this.bindings.usageAnalytics.logCustomEvent({ name: 'openUserActions', type: 'User Actions' }, {}, this.element);
this.root.classList.add(UserActions.USER_ACTION_OPENED);
Expand Down

0 comments on commit 308575b

Please sign in to comment.