Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: prevent error for root shadow elements when restorEl is enabled #8679

Merged
merged 1 commit into from
May 3, 2024

Commits on Apr 9, 2024

  1. fix: prevent error for root shadow elements when restorEl is enabled

    Addresses an issue where activating the `restoreEl` option for an element at the root of a shadow DOM threw a "TypeError: el.parentNode.hasAttribute is not a function". The bug was due to the `parentNode` being a shadow root, which does not have the `hasAttribute` method.
    
    The fix implemented checks for the existence of the `hasAttribute` method on `parentNode`.
    jboix committed Apr 9, 2024
    Configuration menu
    Copy the full SHA
    d9c43ab View commit details
    Browse the repository at this point in the history