diff --git a/webapp/channels/src/components/suggestion/modal_suggestion_list.tsx b/webapp/channels/src/components/suggestion/modal_suggestion_list.tsx index 3cfc517a5b..0a69365c45 100644 --- a/webapp/channels/src/components/suggestion/modal_suggestion_list.tsx +++ b/webapp/channels/src/components/suggestion/modal_suggestion_list.tsx @@ -4,7 +4,6 @@ import React from 'react'; import SuggestionList from 'components/suggestion/suggestion_list'; -import {getClosestParent} from 'utils/utils'; // eslint-disable-next-line @typescript-eslint/no-empty-interface interface SuggestionItem {} @@ -88,7 +87,7 @@ export default class ModalSuggestionList extends React.PureComponent modalBodyRect.bottom))) { this.props.onLoseVisibility(); return; @@ -180,8 +180,8 @@ export default class ModalSuggestionList extends React.PureComponent { - // @ts-expect-error // TODO: resolve this typing and see if using function this is necessary - const matches = (this.document || this.ownerDocument).querySelectorAll(s); - let i = matches.length - 1; - - // @ts-expect-error // TODO: resolve this typing and see if using function this is necessary - while (i >= 0 && matches.item(i) !== this) { - i--; - } - return i > -1; - }); - } - - // Get the closest matching element - let currentElem = elem; - - // @ts-expect-error // TODO: resolve this typing and see if using function this is necessary - for (; currentElem && currentElem !== document; currentElem = currentElem.parentNode) { - if (currentElem.matches(selector)) { - return currentElem; - } - } - return null; -} - export function getNextBillingDate() { const nextBillingDate = moment().add(1, 'months').startOf('month'); return nextBillingDate.format('MMM D, YYYY');