Skip to content

function inShadow throws error when shadowRoot is undefined #462

Description

@mazengh

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;

Version: rc-util: 5.37.0

No activity

Activity on this issue will appear here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions