Skip to content

Commit

Permalink
fix lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Gr3q committed Aug 15, 2024
1 parent 51719a6 commit a7e66a1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions packages/mui-material/src/Modal/ModalManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ function ariaHiddenElements(
): void {
let current: Element | null = container;
let previousElement: Element =
container == mountElement ? currentElement : mountElement ?? currentElement;
container === mountElement ? currentElement : mountElement ?? currentElement;
const html = ownerDocument(container).body.parentElement;
const blacklist = [mountElement, ...elementsToExclude];

Expand All @@ -77,7 +77,7 @@ function ariaHiddenElements(
}

while (!!current && html !== current) {
for (let i = 0; i < current.children.length; i++) {
for (let i = 0; i < current.children.length; i+=1) {
const element = current.children[i];
const isNotExcludedElement = blacklist.indexOf(element) === -1;
const isNotForbiddenElement = !isAriaHiddenForbiddenOnElement(element);
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-material/src/Modal/useModal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ function useModal(parameters: UseModalParameters): UseModalReturnValue {
* Resolving this could be simplified (mountNodeRef should take priority when it's set)
* but this will also work because the logic matches {@link Portal}.
*/
let resolvedContainer = disablePortal
const resolvedContainer = disablePortal
? (mountNodeRef.current ?? modalRef.current)?.parentElement ?? getDoc().body
: getContainer(container) || getDoc().body;

Expand Down

0 comments on commit a7e66a1

Please sign in to comment.