Skip to content

Commit

Permalink
fix(SFINT-3248): Replace prepend by insertBefore (#75)
Browse files Browse the repository at this point in the history
prepend is not supported by antiquated browser among other things (LockerService).
insertBefore works everywhere.
  • Loading branch information
louis-bompart authored Jun 10, 2020
1 parent 0226ff2 commit c455960
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/UserActions/UserActivity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ export class UserActivity extends Component {

const titleSection = this.buildTitleSection(action);
titleSection.querySelector(`.${ACTIVITY_TITLE_CLASS}`).remove();
titleSection.prepend(titleElem);
titleSection.insertBefore(titleElem, titleSection.firstChild);

const dataElement = document.createElement('div');
dataElement.classList.add(DATA_CLASS);
Expand Down

0 comments on commit c455960

Please sign in to comment.