Skip to content

Commit

Permalink
Revert "Fix upstream bug in stacking-order"
Browse files Browse the repository at this point in the history
This reverts commit 074cc6a.
  • Loading branch information
bvaughn committed Mar 14, 2024
1 parent 15df39c commit 24465ef
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions packages/react-resizable-panels/src/vendor/stacking-order.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// Forked from NPM stacking-order@2.0.0
// Background at https://github.com/Rich-Harris/stacking-order/issues/3
// Background at https://github.com/Rich-Harris/stacking-order/issues/6

import { assert } from "..";

Expand Down Expand Up @@ -62,7 +61,7 @@ const props =

/** @param {HTMLElement} node */
function is_flex_item(node: HTMLElement) {
const display = getComputedStyle(get_parent(node) ?? node).display;
const display = getComputedStyle(get_parent(node)).display;
return display === "flex" || display === "inline-flex";
}

Expand Down Expand Up @@ -130,5 +129,5 @@ function get_ancestors(node: HTMLElement) {
/** @param {HTMLElement} node */
function get_parent(node: HTMLElement) {
// @ts-ignore
return node.parentNode?.host;
return node.parentNode?.host || node.parentNode;
}

0 comments on commit 24465ef

Please sign in to comment.