Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
fix: clarify intention of condition
Browse files Browse the repository at this point in the history
  • Loading branch information
justjanne committed Apr 26, 2022
1 parent ecca342 commit d34a404
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/views/rooms/ReadReceiptMarker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ export default class ReadReceiptMarker extends React.PureComponent<IProps, IStat
const element = this.avatar.current;
// this is the mx_ReadReceiptsGroup_container
const horizontalContainer = element.offsetParent;
if (horizontalContainer == null || !(horizontalContainer instanceof HTMLElement)) {
if (!horizontalContainer || !(horizontalContainer instanceof HTMLElement)) {
// this seems to happen sometimes for reasons I don't understand
// the docs for `offsetParent` say it may be null if `display` is
// `none`, but I can't see why that would happen.
Expand All @@ -140,7 +140,7 @@ export default class ReadReceiptMarker extends React.PureComponent<IProps, IStat
}
// this is the mx_ReadReceiptsGroup
const verticalContainer = horizontalContainer.offsetParent;
if (verticalContainer == null || !(verticalContainer instanceof HTMLElement)) {
if (!verticalContainer || !(verticalContainer instanceof HTMLElement)) {
// this seems to happen sometimes for reasons I don't understand
// the docs for `offsetParent` say it may be null if `display` is
// `none`, but I can't see why that would happen.
Expand Down

0 comments on commit d34a404

Please sign in to comment.