You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
function inShadow throws error when shadowRoot is undefined #462
I am using latest antd library version 5.8.6 which is dependent on rc-util. There is an edge case where shadowRoot is undefined. When inShadow function is called, the whole page breaks throwing the error below.
VM107071:1 Uncaught TypeError: Right-hand side of 'instanceof' is not an object
It used to work when function returned return getRoot(ele) !== ele?.ownerDocument;
Activity
mazengh commentedon Sep 6, 2023
is it possible to create a PR to change the logic as below?
export function inShadow(ele: Node) { const root = getRoot(ele); return ShadowRoot ? root instanceof ShadowRoot : root !== ele?.ownerDocument; }fix: dom not appended should not be treated as ShadowRoot (#457)